Use RW spin locks
All checks were successful
Build documentation / build-and-deploy (push) Successful in 39s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 39s
This commit is contained in:
16
kernel/sync/rw_spin_lock.h
Normal file
16
kernel/sync/rw_spin_lock.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef _KERNEL_SYNC_RW_SPIN_LOCK_H
|
||||
#define _KERNEL_SYNC_RW_SPIN_LOCK_H
|
||||
|
||||
#include <libk/std.h>
|
||||
#include <sync/spin_lock.h>
|
||||
|
||||
#define RW_SPIN_LOCK_INIT 0
|
||||
|
||||
typedef _Atomic (uint32_t) rw_spin_lock_t;
|
||||
|
||||
void rw_spin_read_lock (rw_spin_lock_t* rw);
|
||||
void rw_spin_read_unlock (rw_spin_lock_t* rw);
|
||||
void rw_spin_write_lock (rw_spin_lock_t* rw);
|
||||
void rw_spin_write_unlock (rw_spin_lock_t* rw);
|
||||
|
||||
#endif // _KERNEL_SYNC_RW_SPIN_LOCK_H
|
||||
Reference in New Issue
Block a user