From 8f581c0e66e52a6f24e85763b39ed3be29a3e792 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 20 Dec 2016 20:49:37 -0800 Subject: Use separate macros for atomics that don't take a memory order --- OpenAL32/alThunk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenAL32/alThunk.c') 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); } -- cgit v1.2.3