Spin lock initializer

This commit is contained in:
Vftdan 2024-10-25 01:38:26 +02:00
parent aaa595dbb7
commit 6b76570afd
1 changed files with 2 additions and 0 deletions

View File

@ -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)
{