diff options
author | Chris Robinson <[email protected]> | 2016-11-21 21:38:49 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-11-21 21:38:49 -0800 |
commit | 8bf4fe2eea11afd753e25dd495c26e6522436b5f (patch) | |
tree | 484e799039b43837a947667140dfc3c32e3e1c11 /Alc/ALu.c | |
parent | a502a41be340826585f9c91b3a8d9a52b5601b54 (diff) |
Update some atomic memory ordering
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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); |