#ifndef _KERNEL_SYNC_RW_SPIN_LOCK_H #define _KERNEL_SYNC_RW_SPIN_LOCK_H #include #include #include #define RW_SPIN_LOCK_INIT 0 typedef _Atomic (uint32_t) rw_spin_lock_t; void rw_spin_read_lock (rw_spin_lock_t* rw, spin_lock_ctx_t* ctx); void rw_spin_read_unlock (rw_spin_lock_t* rw, spin_lock_ctx_t* ctx); void rw_spin_write_lock (rw_spin_lock_t* rw, spin_lock_ctx_t* ctx); void rw_spin_write_unlock (rw_spin_lock_t* rw, spin_lock_ctx_t* ctx); #endif // _KERNEL_SYNC_RW_SPIN_LOCK_H