aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alAuxEffectSlot.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-05-29 02:47:54 -0700
committerChris Robinson <[email protected]>2016-05-29 02:47:54 -0700
commit4802465f1a6365051604f38dae9c20c93c0f0a7b (patch)
tree826777dc9aac2c56bd53fa000e9387ceecc7717f /OpenAL32/Include/alAuxEffectSlot.h
parent8aa4a74a7b213f2a8a3e0126a248357e587d34a8 (diff)
Hold the effectslot map lock while handling it
Diffstat (limited to 'OpenAL32/Include/alAuxEffectSlot.h')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index a9b50387..8d2fc3d7 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -133,10 +133,19 @@ typedef struct ALeffectslot {
ATOMIC(struct ALeffectslot*) next;
} ALeffectslot;
+inline void LockEffectSlotsRead(ALCcontext *context)
+{ LockUIntMapRead(&context->EffectSlotMap); }
+inline void UnlockEffectSlotsRead(ALCcontext *context)
+{ UnlockUIntMapRead(&context->EffectSlotMap); }
+inline void LockEffectSlotsWrite(ALCcontext *context)
+{ LockUIntMapWrite(&context->EffectSlotMap); }
+inline void UnlockEffectSlotsWrite(ALCcontext *context)
+{ UnlockUIntMapWrite(&context->EffectSlotMap); }
+
inline struct ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id)
-{ return (struct ALeffectslot*)LookupUIntMapKey(&context->EffectSlotMap, id); }
+{ return (struct ALeffectslot*)LookupUIntMapKeyNoLock(&context->EffectSlotMap, id); }
inline struct ALeffectslot *RemoveEffectSlot(ALCcontext *context, ALuint id)
-{ return (struct ALeffectslot*)RemoveUIntMapKey(&context->EffectSlotMap, id); }
+{ return (struct ALeffectslot*)RemoveUIntMapKeyNoLock(&context->EffectSlotMap, id); }
ALenum InitEffectSlot(ALeffectslot *slot);
void DeinitEffectSlot(ALeffectslot *slot);