aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alAuxEffectSlot.c6
-rw-r--r--OpenAL32/alListener.c6
-rw-r--r--OpenAL32/alSource.c7
3 files changed, 3 insertions, 16 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index a7bc0f32..e6b4ff68 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -671,11 +671,7 @@ void UpdateEffectSlotProps(ALeffectslot *slot)
/* If there was an unused update container, put it back in the
* freelist.
*/
- struct ALeffectslotProps *first = ATOMIC_LOAD_SEQ(&slot->FreeList);
- do {
- ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
- } while(ATOMIC_COMPARE_EXCHANGE_WEAK_SEQ(struct ALeffectslotProps*,
- &slot->FreeList, &first, props) == 0);
+ ATOMIC_REPLACE_HEAD(struct ALeffectslotProps*, &slot->FreeList, props);
}
if(oldstate)
diff --git a/OpenAL32/alListener.c b/OpenAL32/alListener.c
index f05c20d1..9c237e99 100644
--- a/OpenAL32/alListener.c
+++ b/OpenAL32/alListener.c
@@ -506,10 +506,6 @@ void UpdateListenerProps(ALCcontext *context)
/* If there was an unused update container, put it back in the
* freelist.
*/
- struct ALlistenerProps *first = ATOMIC_LOAD_SEQ(&listener->FreeList);
- do {
- ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
- } while(ATOMIC_COMPARE_EXCHANGE_WEAK_SEQ(struct ALlistenerProps*,
- &listener->FreeList, &first, props) == 0);
+ ATOMIC_REPLACE_HEAD(struct ALlistenerProps*, &listener->FreeList, props);
}
}
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 9f60c545..e3d3cf1b 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2913,12 +2913,7 @@ static void UpdateSourceProps(ALsource *source, ALuint num_sends)
/* If there was an unused update container, put it back in the
* freelist.
*/
- struct ALsourceProps *first = ATOMIC_LOAD_SEQ(&source->FreeList);
- do {
- ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
- } while(ATOMIC_COMPARE_EXCHANGE_WEAK(struct ALsourceProps*,
- &source->FreeList, &first, props, almemory_order_acq_rel,
- almemory_order_acquire) == 0);
+ ATOMIC_REPLACE_HEAD(struct ALsourceProps*, &source->FreeList, props);
}
}