aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/helpers.c14
-rw-r--r--Alc/rwlock.h10
2 files changed, 12 insertions, 12 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 77a660d1..07e87815 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -584,24 +584,24 @@ void SetRTPriority(void)
}
-static void Lock(volatile ALenum *l)
+static void Lock(volatile int *l)
{
- while(ExchangeInt(l, AL_TRUE) == AL_TRUE)
+ while(ExchangeInt(l, true) == true)
althrd_yield();
}
-static void Unlock(volatile ALenum *l)
+static void Unlock(volatile int *l)
{
- ExchangeInt(l, AL_FALSE);
+ ExchangeInt(l, false);
}
void RWLockInit(RWLock *lock)
{
lock->read_count = 0;
lock->write_count = 0;
- lock->read_lock = AL_FALSE;
- lock->read_entry_lock = AL_FALSE;
- lock->write_lock = AL_FALSE;
+ lock->read_lock = false;
+ lock->read_entry_lock = false;
+ lock->write_lock = false;
}
void ReadLock(RWLock *lock)
diff --git a/Alc/rwlock.h b/Alc/rwlock.h
index 0c321a11..764940fa 100644
--- a/Alc/rwlock.h
+++ b/Alc/rwlock.h
@@ -1,17 +1,17 @@
#ifndef AL_RWLOCK_H
#define AL_RWLOCK_H
-#include "AL/al.h"
+#include "bool.h"
#include "atomic.h"
typedef struct {
volatile RefCount read_count;
volatile RefCount write_count;
- volatile ALenum read_lock;
- volatile ALenum read_entry_lock;
- volatile ALenum write_lock;
+ volatile int read_lock;
+ volatile int read_entry_lock;
+ volatile int write_lock;
} RWLock;
-#define RWLOCK_STATIC_INITIALIZE { 0, 0, AL_FALSE, AL_FALSE, AL_FALSE }
+#define RWLOCK_STATIC_INITIALIZE { 0, 0, false, false, false }
void RWLockInit(RWLock *lock);
void ReadLock(RWLock *lock);