aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-20 10:55:57 -0800
committerChris Robinson <[email protected]>2018-11-20 10:55:57 -0800
commitf9e969a3391e1c0622e35ceaf5dc541b7f149c5d (patch)
treebb730c98c215906f446cf8f4e59ab4f224be229b /Alc
parent191ea90de3994f9e98377ea9318c4c7b6885179c (diff)
Use a standard mutex for the event callback lock
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp2
-rw-r--r--Alc/alcontext.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 00148246..65e77b0d 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2539,7 +2539,6 @@ static ALvoid InitContext(ALCcontext *Context)
Context->SpeedOfSound = SPEEDOFSOUNDMETRESPERSEC;
Context->MetersPerUnit = AL_DEFAULT_METERS_PER_UNIT;
alsem_init(&Context->EventSem, 0);
- almtx_init(&Context->EventCbLock, almtx_plain);
Context->ExtensionList = alExtList;
@@ -2650,7 +2649,6 @@ ALCcontext_struct::~ALCcontext_struct()
}
TRACE("Freed " SZFMT " listener property object%s\n", count, (count==1)?"":"s");
- almtx_destroy(&EventCbLock);
alsem_destroy(&EventSem);
ll_ringbuffer_free(AsyncEvents);
diff --git a/Alc/alcontext.h b/Alc/alcontext.h
index ce715bc2..4a056597 100644
--- a/Alc/alcontext.h
+++ b/Alc/alcontext.h
@@ -1,6 +1,8 @@
#ifndef ALCONTEXT_H
#define ALCONTEXT_H
+#include <mutex>
+#include <atomic>
#include <memory>
#include <thread>
@@ -102,7 +104,7 @@ struct ALCcontext_struct {
alsem_t EventSem;
ll_ringbuffer *AsyncEvents{nullptr};
ATOMIC(ALbitfieldSOFT) EnabledEvts{0u};
- almtx_t EventCbLock;
+ std::mutex EventCbLock;
ALEVENTPROCSOFT EventCb{};
void *EventParam{nullptr};