aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-18 03:59:39 -0800
committerChris Robinson <[email protected]>2018-11-18 03:59:39 -0800
commitf48be9d73b4472570d28bf381d84e40cf65694c8 (patch)
tree59a4b4a9c869beab928cf06a35d3592dc4c334d0 /OpenAL32/alAuxEffectSlot.cpp
parent7433cb5f4cb0515dd6e314978f579ae91e2c63c4 (diff)
Remove the pointer-specific atomic exchange macros
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.cpp')
-rw-r--r--OpenAL32/alAuxEffectSlot.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp
index e67571a2..ceb5cf39 100644
--- a/OpenAL32/alAuxEffectSlot.cpp
+++ b/OpenAL32/alAuxEffectSlot.cpp
@@ -622,8 +622,7 @@ static void AddActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcontex
newarray->count = newcount;
}
- curarray = static_cast<ALeffectslotArray*>(ATOMIC_EXCHANGE_PTR(&context->ActiveAuxSlots,
- newarray, almemory_order_acq_rel));
+ curarray = ATOMIC_EXCHANGE(&context->ActiveAuxSlots, newarray, almemory_order_acq_rel);
while((ATOMIC_LOAD(&device->MixCount, almemory_order_acquire)&1))
althrd_yield();
al_free(curarray);
@@ -658,8 +657,7 @@ static void RemoveActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcon
/* TODO: Could reallocate newarray now that we know it's needed size. */
- curarray = static_cast<ALeffectslotArray*>(ATOMIC_EXCHANGE_PTR(&context->ActiveAuxSlots,
- newarray, almemory_order_acq_rel));
+ curarray = ATOMIC_EXCHANGE(&context->ActiveAuxSlots, newarray, almemory_order_acq_rel);
while((ATOMIC_LOAD(&device->MixCount, almemory_order_acquire)&1))
althrd_yield();
al_free(curarray);
@@ -728,7 +726,7 @@ void UpdateEffectSlotProps(ALeffectslot *slot, ALCcontext *context)
struct ALeffectslotProps *next;
do {
next = ATOMIC_LOAD(&props->next, almemory_order_relaxed);
- } while(ATOMIC_COMPARE_EXCHANGE_PTR_WEAK(&context->FreeEffectslotProps, &props, next,
+ } while(ATOMIC_COMPARE_EXCHANGE_WEAK(&context->FreeEffectslotProps, &props, next,
almemory_order_seq_cst, almemory_order_acquire) == 0);
}
@@ -746,8 +744,7 @@ void UpdateEffectSlotProps(ALeffectslot *slot, ALCcontext *context)
props->State = slot->Effect.State;
/* Set the new container for updating internal parameters. */
- props = static_cast<ALeffectslotProps*>(ATOMIC_EXCHANGE_PTR(&slot->Update, props,
- almemory_order_acq_rel));
+ props = ATOMIC_EXCHANGE(&slot->Update, props, almemory_order_acq_rel);
if(props)
{
/* If there was an unused update container, put it back in the