aboutsummaryrefslogtreecommitdiffstats
path: root/include/rwlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rwlock.h')
-rw-r--r--include/rwlock.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/rwlock.h b/include/rwlock.h
index 158a0670..8e36fa1a 100644
--- a/include/rwlock.h
+++ b/include/rwlock.h
@@ -11,13 +11,12 @@ extern "C" {
typedef struct {
RefCount read_count;
RefCount write_count;
- ATOMIC(int) read_lock;
- ATOMIC(int) read_entry_lock;
- ATOMIC(int) write_lock;
+ ATOMIC_FLAG read_lock;
+ ATOMIC_FLAG read_entry_lock;
+ ATOMIC_FLAG write_lock;
} RWLock;
#define RWLOCK_STATIC_INITIALIZE { ATOMIC_INIT_STATIC(0), ATOMIC_INIT_STATIC(0), \
- ATOMIC_INIT_STATIC(false), ATOMIC_INIT_STATIC(false), \
- ATOMIC_INIT_STATIC(false) }
+ ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT }
void RWLockInit(RWLock *lock);
void ReadLock(RWLock *lock);