diff options
author | Chris Robinson <[email protected]> | 2018-11-27 13:41:30 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-27 13:41:30 -0800 |
commit | f26083e9edc6491f553aae951886d89b70288528 (patch) | |
tree | 1bb2b82ec786cbe2a98a3a5066c0be7c52dff1d1 /Alc/alu.cpp | |
parent | 3f745be1dc4df7ffeec89f1d90af41e139fb49db (diff) |
Make and use a semaphore class
Diffstat (limited to 'Alc/alu.cpp')
-rw-r--r-- | Alc/alu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 5036ae24..c7ed0878 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -313,7 +313,7 @@ void SendSourceStoppedEvent(ALCcontext *context, ALuint id) strcpy(evt.u.user.msg+strpos, " state changed to AL_STOPPED"); if(ll_ringbuffer_write(context->AsyncEvents, &evt, 1) == 1) - alsem_post(&context->EventSem); + context->EventSem.post(); } @@ -441,7 +441,7 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALCcontext *context, bool force) props->State = NULL; if(LIKELY(ll_ringbuffer_write(context->AsyncEvents, &evt, 1) != 0)) - alsem_post(&context->EventSem); + context->EventSem.post(); else { /* If writing the event failed, the queue was probably full. @@ -1857,7 +1857,7 @@ void aluHandleDisconnect(ALCdevice *device, const char *msg, ...) ALbitfieldSOFT enabledevt = ctx->EnabledEvts.load(std::memory_order_acquire); if((enabledevt&EventType_Disconnected) && ll_ringbuffer_write(ctx->AsyncEvents, &evt, 1) == 1) - alsem_post(&ctx->EventSem); + ctx->EventSem.post(); std::for_each(ctx->Voices, ctx->Voices+ctx->VoiceCount.load(std::memory_order_acquire), [ctx](ALvoice *voice) -> void |