git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix file system racing and ext2 directory insertion (#58)
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
ds
/
spinlock.h
diff --git
a/lunaix-os/includes/lunaix/ds/spinlock.h
b/lunaix-os/includes/lunaix/ds/spinlock.h
index 557f310bf37245dcfa73b3d58afd60119df76d2e..cea310a4fab1f4434a19c809bd16a2e8746dd05a 100644
(file)
--- a/
lunaix-os/includes/lunaix/ds/spinlock.h
+++ b/
lunaix-os/includes/lunaix/ds/spinlock.h
@@
-8,6
+8,9
@@
struct spinlock
volatile bool flag;
};
volatile bool flag;
};
+#define DEFINE_SPINLOCK(name) \
+ struct spinlock name = { .flag = false }
+
typedef struct spinlock spinlock_t;
/*
typedef struct spinlock spinlock_t;
/*