aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-19 03:21:58 -0800
committerChris Robinson <[email protected]>2018-11-19 03:21:58 -0800
commite24435ef58b2f28555e6397f502f41f36524dac9 (patch)
tree5b828032fff7d64a2d613a40e7dac09cc5c05840 /OpenAL32/alState.cpp
parentc5142530d675885415c9168869eb6c125ce10876 (diff)
Remove the atomic exchange macros
Diffstat (limited to 'OpenAL32/alState.cpp')
-rw-r--r--OpenAL32/alState.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alState.cpp b/OpenAL32/alState.cpp
index 836853bb..a3c3cc1f 100644
--- a/OpenAL32/alState.cpp
+++ b/OpenAL32/alState.cpp
@@ -765,16 +765,16 @@ AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index)
void UpdateContextProps(ALCcontext *context)
{
/* Get an unused proprty container, or allocate a new one as needed. */
- struct ALcontextProps *props{ATOMIC_LOAD(&context->FreeContextProps, almemory_order_acquire)};
+ struct ALcontextProps *props{context->FreeContextProps.load(std::memory_order_acquire)};
if(!props)
props = static_cast<ALcontextProps*>(al_calloc(16, sizeof(*props)));
else
{
struct ALcontextProps *next;
do {
- next = ATOMIC_LOAD(&props->next, almemory_order_relaxed);
- } while(ATOMIC_COMPARE_EXCHANGE_WEAK(&context->FreeContextProps, &props, next,
- almemory_order_seq_cst, almemory_order_acquire) == 0);
+ next = props->next.load(std::memory_order_relaxed);
+ } while(context->FreeContextProps.compare_exchange_weak(props, next,
+ std::memory_order_seq_cst, std::memory_order_acquire) == 0);
}
/* Copy in current property values. */
@@ -788,7 +788,7 @@ void UpdateContextProps(ALCcontext *context)
props->mDistanceModel = context->mDistanceModel;
/* Set the new container for updating internal parameters. */
- props = ATOMIC_EXCHANGE(&context->Update, props, almemory_order_acq_rel);
+ props = context->Update.exchange(props, std::memory_order_acq_rel);
if(props)
{
/* If there was an unused update container, put it back in the