12 #ifndef __METAL_SPINLOCK__H__
13 #define __METAL_SPINLOCK__H__
15 #include <metal/atomic.h>
16 #include <metal/cpu.h>
31 #define METAL_SPINLOCK_INIT {ATOMIC_FLAG_INIT}
#define atomic_flag_test_and_set(FLAG)
Definition: atomic.h:44
#define atomic_flag_clear(FLAG)
Definition: atomic.h:48
int atomic_flag
Definition: atomic.h:19
static void metal_spinlock_init(struct metal_spinlock *slock)
Initialize a libmetal spinlock.
Definition: spinlock.h:37
static void metal_spinlock_release(struct metal_spinlock *slock)
Release a previously acquired spinlock.
Definition: spinlock.h:59
static void metal_spinlock_acquire(struct metal_spinlock *slock)
Acquire a spinlock.
Definition: spinlock.h:47
#define metal_cpu_yield()
Definition: cpu.h:15