#ifndef CORE_SPIN_LOCK_H #define CORE_SPIN_LOCK_H #include <stdatomic.h> typedef struct { atomic_bool lock; } SpinLock; void initSpinLock(SpinLock* l); void lockSpinLock(SpinLock* l); void unlockSpinLock(SpinLock* l); #endif