aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-09-20 22:53:16 -0700
committerChris Robinson <[email protected]>2018-09-20 22:53:16 -0700
commitf21e2df4cf0d51fda31f5607e1bf966459d9bf9d (patch)
tree0499d631d6498aa9c5eb7f6851aecd5cff7214d6
parent84a90b7cc39a797781566ceebd6de40c495808aa (diff)
Remove an unnecessary mutex
-rw-r--r--Alc/ALc.c2
-rw-r--r--OpenAL32/Include/alMain.h1
-rw-r--r--OpenAL32/event.c2
3 files changed, 0 insertions, 5 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 7d3e3649..9a1051c9 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2638,7 +2638,6 @@ static ALvoid InitContext(ALCcontext *Context)
Context->MetersPerUnit = AL_DEFAULT_METERS_PER_UNIT;
ATOMIC_FLAG_TEST_AND_SET(&Context->PropsClean, almemory_order_relaxed);
ATOMIC_INIT(&Context->DeferUpdates, AL_FALSE);
- almtx_init(&Context->EventThrdLock, almtx_plain);
alsem_init(&Context->EventSem, 0);
Context->AsyncEvents = NULL;
ATOMIC_INIT(&Context->EnabledEvts, 0);
@@ -2779,7 +2778,6 @@ static void FreeContext(ALCcontext *context)
TRACE("Freed "SZFMT" listener property object%s\n", count, (count==1)?"":"s");
almtx_destroy(&context->EventCbLock);
- almtx_destroy(&context->EventThrdLock);
alsem_destroy(&context->EventSem);
ll_ringbuffer_free(context->AsyncEvents);
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 86ac49dc..3a08e8c1 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -827,7 +827,6 @@ struct ALCcontext_struct {
ATOMIC(struct ALeffectslotArray*) ActiveAuxSlots;
- almtx_t EventThrdLock;
althrd_t EventThread;
alsem_t EventSem;
struct ll_ringbuffer *AsyncEvents;
diff --git a/OpenAL32/event.c b/OpenAL32/event.c
index a76746bd..c0bf4204 100644
--- a/OpenAL32/event.c
+++ b/OpenAL32/event.c
@@ -73,7 +73,6 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A
SETERR_GOTO(context, AL_INVALID_ENUM, done, "Invalid event type 0x%04x", types[i]);
}
- almtx_lock(&context->EventThrdLock);
if(enable)
{
enabledevts = ATOMIC_LOAD(&context->EnabledEvts, almemory_order_relaxed);
@@ -98,7 +97,6 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A
almtx_lock(&context->EventCbLock);
almtx_unlock(&context->EventCbLock);
}
- almtx_unlock(&context->EventThrdLock);
done:
ALCcontext_DecRef(context);