Remove an unnecessary mutex

This commit is contained in:
Chris Robinson
2018-09-20 22:53:16 -07:00
parent 84a90b7cc3
commit f21e2df4cf
3 changed files with 0 additions and 5 deletions
-2
View File
@@ -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);
-1
View File
@@ -827,7 +827,6 @@ struct ALCcontext_struct {
ATOMIC(struct ALeffectslotArray*) ActiveAuxSlots;
almtx_t EventThrdLock;
althrd_t EventThread;
alsem_t EventSem;
struct ll_ringbuffer *AsyncEvents;
-2
View File
@@ -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);