aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/event.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-27 13:41:30 -0800
committerChris Robinson <[email protected]>2018-11-27 13:41:30 -0800
commitf26083e9edc6491f553aae951886d89b70288528 (patch)
tree1bb2b82ec786cbe2a98a3a5066c0be7c52dff1d1 /OpenAL32/event.cpp
parent3f745be1dc4df7ffeec89f1d90af41e139fb49db (diff)
Make and use a semaphore class
Diffstat (limited to 'OpenAL32/event.cpp')
-rw-r--r--OpenAL32/event.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/event.cpp b/OpenAL32/event.cpp
index a47787bd..b7599a02 100644
--- a/OpenAL32/event.cpp
+++ b/OpenAL32/event.cpp
@@ -23,7 +23,7 @@ static int EventThread(ALCcontext *context)
AsyncEvent evt;
if(ll_ringbuffer_read(context->AsyncEvents, &evt, 1) == 0)
{
- alsem_wait(&context->EventSem);
+ context->EventSem.wait();
continue;
}
@@ -66,7 +66,7 @@ void StopEventThrd(ALCcontext *ctx)
static constexpr AsyncEvent kill_evt = ASYNC_EVENT(EventType_KillThread);
while(ll_ringbuffer_write(ctx->AsyncEvents, &kill_evt, 1) == 0)
std::this_thread::yield();
- alsem_post(&ctx->EventSem);
+ ctx->EventSem.post();
if(ctx->EventThread.joinable())
ctx->EventThread.join();
}