aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alThunk.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-12-20 20:49:37 -0800
committerChris Robinson <[email protected]>2016-12-20 20:49:37 -0800
commit8f581c0e66e52a6f24e85763b39ed3be29a3e792 (patch)
treedbc69819f46379d6fb99261b3663bad5e521e197 /OpenAL32/alThunk.c
parent19ba71e767041c4f4b5f2f376ea0136c12dec2e7 (diff)
Use separate macros for atomics that don't take a memory order
Diffstat (limited to 'OpenAL32/alThunk.c')
-rw-r--r--OpenAL32/alThunk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/alThunk.c b/OpenAL32/alThunk.c
index 72fc0dcb..d3892c97 100644
--- a/OpenAL32/alThunk.c
+++ b/OpenAL32/alThunk.c
@@ -54,7 +54,7 @@ ALenum NewThunkEntry(ALuint *index)
ReadLock(&ThunkLock);
for(i = 0;i < ThunkArraySize;i++)
{
- if(ATOMIC_EXCHANGE(ALenum, &ThunkArray[i], AL_TRUE) == AL_FALSE)
+ if(ATOMIC_EXCHANGE(ALenum, &ThunkArray[i], AL_TRUE, almemory_order_acq_rel) == AL_FALSE)
{
ReadUnlock(&ThunkLock);
*index = i+1;
@@ -69,7 +69,7 @@ ALenum NewThunkEntry(ALuint *index)
*/
for(;i < ThunkArraySize;i++)
{
- if(ATOMIC_EXCHANGE(ALenum, &ThunkArray[i], AL_TRUE) == AL_FALSE)
+ if(ATOMIC_EXCHANGE(ALenum, &ThunkArray[i], AL_TRUE, almemory_order_acq_rel) == AL_FALSE)
{
WriteUnlock(&ThunkLock);
*index = i+1;
@@ -89,7 +89,7 @@ ALenum NewThunkEntry(ALuint *index)
ThunkArray = NewList;
ThunkArraySize *= 2;
- ATOMIC_STORE(&ThunkArray[i], AL_TRUE);
+ ATOMIC_STORE_SEQ(&ThunkArray[i], AL_TRUE);
WriteUnlock(&ThunkLock);
*index = i+1;
@@ -100,6 +100,6 @@ void FreeThunkEntry(ALuint index)
{
ReadLock(&ThunkLock);
if(index > 0 && index <= ThunkArraySize)
- ATOMIC_STORE(&ThunkArray[index-1], AL_FALSE);
+ ATOMIC_STORE_SEQ(&ThunkArray[index-1], AL_FALSE);
ReadUnlock(&ThunkLock);
}