aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-11-21 21:38:49 -0800
committerChris Robinson <[email protected]>2016-11-21 21:38:49 -0800
commit8bf4fe2eea11afd753e25dd495c26e6522436b5f (patch)
tree484e799039b43837a947667140dfc3c32e3e1c11 /Alc/ALu.c
parenta502a41be340826585f9c91b3a8d9a52b5601b54 (diff)
Update some atomic memory ordering
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index cc01f336..b90a3983 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -293,11 +293,12 @@ static ALboolean CalcListenerParams(ALCcontext *Context)
* in the old container (practically impossible with this little code,
* but...).
*/
- first = ATOMIC_LOAD(&Listener->FreeList);
+ first = ATOMIC_LOAD(&Listener->FreeList, almemory_order_acquire);
do {
ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
} while(ATOMIC_COMPARE_EXCHANGE_WEAK(struct ALlistenerProps*,
- &Listener->FreeList, &first, props) == 0);
+ &Listener->FreeList, &first, props, almemory_order_acq_rel,
+ almemory_order_acquire) == 0);
return AL_TRUE;
}
@@ -341,11 +342,12 @@ static ALboolean CalcEffectSlotParams(ALeffectslot *slot, ALCdevice *device)
* in the old container (practically impossible with this little code,
* but...).
*/
- first = ATOMIC_LOAD(&slot->FreeList);
+ first = ATOMIC_LOAD(&slot->FreeList, almemory_order_acquire);
do {
ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
} while(ATOMIC_COMPARE_EXCHANGE_WEAK(struct ALeffectslotProps*,
- &slot->FreeList, &first, props) == 0);
+ &slot->FreeList, &first, props, almemory_order_acq_rel,
+ almemory_order_acquire) == 0);
return AL_TRUE;
}
@@ -1314,11 +1316,12 @@ static void CalcSourceParams(ALvoice *voice, ALCcontext *context, ALboolean forc
* actually swap in the old container (practically impossible with this
* little code, but...).
*/
- first = ATOMIC_LOAD(&source->FreeList);
+ first = ATOMIC_LOAD(&source->FreeList, almemory_order_acquire);
do {
ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
} while(ATOMIC_COMPARE_EXCHANGE_WEAK(struct ALsourceProps*,
- &source->FreeList, &first, props) == 0);
+ &source->FreeList, &first, props, almemory_order_acq_rel,
+ almemory_order_acquire) == 0);
}
BufferListItem = ATOMIC_LOAD(&source->queue, almemory_order_relaxed);