aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/solaris.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-02-04 00:01:12 -0800
committerChris Robinson <[email protected]>2018-02-04 00:01:12 -0800
commit9b878c64f9ec83adc4886db553ca184952ff50b4 (patch)
treedb4df8b93f71ac2f0887d803f98314d8994011ea /Alc/backends/solaris.c
parent1f61472e77faa0b57231b19236272d3e4d67fbc0 (diff)
Make the Connected state atomic
Also don't send the Disconnected event more than once.
Diffstat (limited to 'Alc/backends/solaris.c')
-rw-r--r--Alc/backends/solaris.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c
index fdc62562..f1c4aeaa 100644
--- a/Alc/backends/solaris.c
+++ b/Alc/backends/solaris.c
@@ -120,7 +120,8 @@ static int ALCsolarisBackend_mixerProc(void *ptr)
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
ALCsolarisBackend_lock(self);
- while(!ATOMIC_LOAD_SEQ(&self->killNow) && device->Connected)
+ while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
+ ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
{
FD_ZERO(&wfds);
FD_SET(self->fd, &wfds);