Spin lock initializer
This commit is contained in:
parent
aaa595dbb7
commit
6b76570afd
|
@ -10,6 +10,8 @@ typedef struct {
|
|||
volatile atomic_flag flag;
|
||||
} SpinLock;
|
||||
|
||||
#define SPIN_LOCK_UNLOCKED (SpinLock) { .flag = ATOMIC_FLAG_INIT }
|
||||
|
||||
HEADER_FN bool
|
||||
spin_lock_try_acquire(SpinLock *lock)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue