aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.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 /Alc/ALu.c
parent19ba71e767041c4f4b5f2f376ea0136c12dec2e7 (diff)
Use separate macros for atomics that don't take a memory order
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index b90a3983..db032057 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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++;