aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-13 20:26:32 -0800
committerChris Robinson <[email protected]>2018-11-13 20:26:32 -0800
commita5f68c21214e6f85ade835cd29045026797ac2a4 (patch)
tree3b995975906303cfc42b8dc3054f3bbed632dbbb /OpenAL32/alAuxEffectSlot.c
parent5867c7b8c213aa47659e7c6e6cafddc643d9ea76 (diff)
Avoid using ATOMIC_FLAG
Although it cant potentially be better than a regular atomic, it presents compatibility issues when non-C11 atomics are mixed with C++
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index e1d84bb9..4758646f 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -103,7 +103,7 @@ static inline ALeffect *LookupEffect(ALCdevice *device, ALuint id)
if(!ATOMIC_LOAD(&context->DeferUpdates, almemory_order_acquire)) \
UpdateEffectSlotProps(slot, context); \
else \
- ATOMIC_FLAG_CLEAR(&slot->PropsClean, almemory_order_release); \
+ ATOMIC_STORE(&slot->PropsClean, AL_FALSE, almemory_order_release); \
} while(0)
@@ -679,7 +679,7 @@ ALenum InitEffectSlot(ALeffectslot *slot)
slot->Gain = 1.0;
slot->AuxSendAuto = AL_TRUE;
- ATOMIC_FLAG_TEST_AND_SET(&slot->PropsClean, almemory_order_relaxed);
+ ATOMIC_INIT(&slot->PropsClean, AL_TRUE);
InitRef(&slot->ref, 0);
ATOMIC_INIT(&slot->Update, NULL);
@@ -773,7 +773,7 @@ void UpdateAllEffectSlotProps(ALCcontext *context)
for(i = 0;i < auxslots->count;i++)
{
ALeffectslot *slot = auxslots->slot[i];
- if(!ATOMIC_FLAG_TEST_AND_SET(&slot->PropsClean, almemory_order_acq_rel))
+ if(!ATOMIC_EXCHANGE(&slot->PropsClean, AL_TRUE, almemory_order_acq_rel))
UpdateEffectSlotProps(slot, context);
}
UnlockEffectSlotList(context);