aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-29 20:21:28 -0700
committerChris Robinson <[email protected]>2011-08-29 20:21:28 -0700
commite4a2b69b37dcefcf2939bc020421daa467a64f43 (patch)
tree233dd2d7aed50420392ee4eca9a12c7d2530c2a7 /Alc/ALc.c
parent8eaa9bb4691dbd479236771064b958bedcdab145 (diff)
Make specific functions to lock/unlock UIntMap access
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 02200e2b..ff5f3c78 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -434,7 +434,7 @@ BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
break;
case DLL_THREAD_DETACH:
- ReadLock(&TlsDestructor.lock);
+ LockUIntMapRead(&TlsDestructor);
for(i = 0;i < TlsDestructor.size;i++)
{
void *ptr = pthread_getspecific(TlsDestructor.array[i].key);
@@ -442,7 +442,7 @@ BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
if(ptr && callback)
callback(ptr);
}
- ReadUnlock(&TlsDestructor.lock);
+ UnlockUIntMapRead(&TlsDestructor);
break;
case DLL_PROCESS_DETACH:
@@ -1239,14 +1239,14 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
ALsizei pos;
context->UpdateSources = AL_FALSE;
- ReadLock(&context->EffectSlotMap.lock);
+ LockUIntMapRead(&context->EffectSlotMap);
for(pos = 0;pos < context->EffectSlotMap.size;pos++)
{
ALeffectslot *slot = context->EffectSlotMap.array[pos].value;
if(ALEffect_DeviceUpdate(slot->EffectState, device) == AL_FALSE)
{
- ReadUnlock(&context->EffectSlotMap.lock);
+ UnlockUIntMapRead(&context->EffectSlotMap);
UnlockDevice(device);
ALCdevice_StopPlayback(device);
device->Flags &= ~DEVICE_RUNNING;
@@ -1255,9 +1255,9 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
slot->NeedsUpdate = AL_FALSE;
ALEffect_Update(slot->EffectState, context, slot);
}
- ReadUnlock(&context->EffectSlotMap.lock);
+ UnlockUIntMapRead(&context->EffectSlotMap);
- ReadLock(&context->SourceMap.lock);
+ LockUIntMapRead(&context->SourceMap);
for(pos = 0;pos < context->SourceMap.size;pos++)
{
ALsource *source = context->SourceMap.array[pos].value;
@@ -1274,7 +1274,7 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
source->NeedsUpdate = AL_FALSE;
ALsource_Update(source, context);
}
- ReadUnlock(&context->SourceMap.lock);
+ UnlockUIntMapRead(&context->SourceMap);
context = context->next;
}