aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/jack.cpp2
-rw-r--r--Alc/backends/null.cpp3
-rw-r--r--Alc/backends/opensl.cpp2
-rw-r--r--Alc/backends/qsa.cpp2
-rw-r--r--Alc/backends/sndio.cpp4
-rw-r--r--Alc/backends/solaris.cpp2
-rw-r--r--Alc/backends/wave.cpp3
7 files changed, 8 insertions, 10 deletions
diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp
index c72958e7..924e1926 100644
--- a/Alc/backends/jack.cpp
+++ b/Alc/backends/jack.cpp
@@ -488,7 +488,7 @@ static void ALCjackPlayback_stop(ALCjackPlayback *self)
{
int res;
- if(ATOMIC_EXCHANGE(&self->killNow, AL_TRUE, almemory_order_acq_rel))
+ if(self->killNow.exchange(AL_TRUE, std::memory_order_acq_rel))
return;
alsem_post(&self->Sem);
diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp
index 255aa01f..47ebd0ae 100644
--- a/Alc/backends/null.cpp
+++ b/Alc/backends/null.cpp
@@ -168,8 +168,7 @@ ALCboolean ALCnullBackend_start(ALCnullBackend *self)
void ALCnullBackend_stop(ALCnullBackend *self)
{
- if(ATOMIC_EXCHANGE(&self->killNow, AL_TRUE, almemory_order_acq_rel) ||
- !self->thread.joinable())
+ if(self->killNow.exchange(AL_TRUE, std::memory_order_acq_rel) || !self->thread.joinable())
return;
self->thread.join();
}
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index d0b1a7b1..0eb194e0 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -610,7 +610,7 @@ static void ALCopenslPlayback_stop(ALCopenslPlayback *self)
SLresult result;
int res;
- if(ATOMIC_EXCHANGE_SEQ(&self->mKillNow, AL_TRUE))
+ if(self->mKillNow.exchange(AL_TRUE))
return;
alsem_post(&self->mSem);
diff --git a/Alc/backends/qsa.cpp b/Alc/backends/qsa.cpp
index 9803d77d..09082357 100644
--- a/Alc/backends/qsa.cpp
+++ b/Alc/backends/qsa.cpp
@@ -614,7 +614,7 @@ static void qsa_stop_playback(PlaybackWrapper *self)
qsa_data *data = self->ExtraData;
int res;
- if(ATOMIC_EXCHANGE(&data->killNow, AL_TRUE, almemory_order_acq_rel))
+ if(data->killNow.exchange(AL_TRUE, std::memory_order_acq_rel))
return;
althrd_join(data->thread, &res);
}
diff --git a/Alc/backends/sndio.cpp b/Alc/backends/sndio.cpp
index 958bc2ff..cc5eacbe 100644
--- a/Alc/backends/sndio.cpp
+++ b/Alc/backends/sndio.cpp
@@ -267,7 +267,7 @@ static void SndioPlayback_stop(SndioPlayback *self)
{
int res;
- if(ATOMIC_EXCHANGE(&self->killNow, AL_TRUE, almemory_order_acq_rel))
+ if(self->killNow.exchange(AL_TRUE, std::memory_order_acq_rel))
return;
althrd_join(self->thread, &res);
@@ -513,7 +513,7 @@ static void SndioCapture_stop(SndioCapture *self)
{
int res;
- if(ATOMIC_EXCHANGE(&self->killNow, AL_TRUE, almemory_order_acq_rel))
+ if(self->killNow.exchange(AL_TRUE, std::memory_order_acq_rel))
return;
althrd_join(self->thread, &res);
diff --git a/Alc/backends/solaris.cpp b/Alc/backends/solaris.cpp
index 86120491..c757e5e1 100644
--- a/Alc/backends/solaris.cpp
+++ b/Alc/backends/solaris.cpp
@@ -282,7 +282,7 @@ static void ALCsolarisBackend_stop(ALCsolarisBackend *self)
{
int res;
- if(ATOMIC_EXCHANGE_SEQ(&self->killNow, AL_TRUE))
+ if(self->killNow.exchange(AL_TRUE))
return;
althrd_join(self->thread, &res);
diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp
index 3f8d8c97..83af40a8 100644
--- a/Alc/backends/wave.cpp
+++ b/Alc/backends/wave.cpp
@@ -367,8 +367,7 @@ ALCboolean ALCwaveBackend_start(ALCwaveBackend *self)
void ALCwaveBackend_stop(ALCwaveBackend *self)
{
- if(ATOMIC_EXCHANGE(&self->killNow, AL_TRUE, almemory_order_acq_rel) ||
- !self->thread.joinable())
+ if(self->killNow.exchange(AL_TRUE, std::memory_order_acq_rel) || !self->thread.joinable())
return;
self->thread.join();