diff options
author | Chris Robinson <[email protected]> | 2016-12-20 20:49:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-12-20 20:49:37 -0800 |
commit | 8f581c0e66e52a6f24e85763b39ed3be29a3e792 (patch) | |
tree | dbc69819f46379d6fb99261b3663bad5e521e197 /Alc/ALu.c | |
parent | 19ba71e767041c4f4b5f2f376ea0136c12dec2e7 (diff) |
Use separate macros for atomics that don't take a memory order
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1347,7 +1347,7 @@ static void UpdateContextSources(ALCcontext *ctx, ALeffectslot *slot) ALsource *source; IncrementRef(&ctx->UpdateCount); - if(!ATOMIC_LOAD(&ctx->HoldUpdates)) + if(!ATOMIC_LOAD(&ctx->HoldUpdates, almemory_order_acquire)) { ALboolean force = CalcListenerParams(ctx); while(slot) @@ -1461,12 +1461,12 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) memset(slot->WetBuffer[i], 0, SamplesToDo*sizeof(ALfloat)); } - ctx = ATOMIC_LOAD(&device->ContextList); + ctx = ATOMIC_LOAD(&device->ContextList, almemory_order_acquire); while(ctx) { ALeffectslot *slotroot; - slotroot = ATOMIC_LOAD(&ctx->ActiveAuxSlotList); + slotroot = ATOMIC_LOAD(&ctx->ActiveAuxSlotList, almemory_order_acquire); UpdateContextSources(ctx, slotroot); slot = slotroot; @@ -1631,7 +1631,7 @@ ALvoid aluHandleDisconnect(ALCdevice *device) device->Connected = ALC_FALSE; - Context = ATOMIC_LOAD(&device->ContextList); + Context = ATOMIC_LOAD_SEQ(&device->ContextList); while(Context) { ALvoice *voice, *voice_end; @@ -1646,9 +1646,9 @@ ALvoid aluHandleDisconnect(ALCdevice *device) if(source && source->state == AL_PLAYING) { source->state = AL_STOPPED; - ATOMIC_STORE(&source->current_buffer, NULL); - ATOMIC_STORE(&source->position, 0); - ATOMIC_STORE(&source->position_fraction, 0); + ATOMIC_STORE(&source->current_buffer, NULL, almemory_order_relaxed); + ATOMIC_STORE(&source->position, 0, almemory_order_relaxed); + ATOMIC_STORE(&source->position_fraction, 0, almemory_order_release); } voice++; |