aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-01-01 15:00:03 -0800
committerChris Robinson <[email protected]>2012-01-01 15:00:03 -0800
commit886f874ff3025fac7bd07b9439f8ecc3b78fcc36 (patch)
tree709787f55a871e0c13dd668ae7c93451dbbba8c3 /Alc
parent466cac328f15f3538c895208bfe7ea14f3923ffc (diff)
Use a proper typedef for handling atomic pointer swaps
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 01d4ddd5..a9b8a84c 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1457,7 +1457,7 @@ static void ReleaseContext(ALCcontext *context, ALCdevice *device)
ALCcontext_DecRef(context);
}
- if(CompExchangePtr((void**)&GlobalContext, context, NULL))
+ if(CompExchangePtr((XchgPtr*)&GlobalContext, context, NULL))
{
WARN("%p released while current\n", context);
ALCcontext_DecRef(context);
@@ -1648,7 +1648,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
do {
device->next = DeviceList;
- } while(!CompExchangePtr((void**)&DeviceList, device->next, device));
+ } while(!CompExchangePtr((XchgPtr*)&DeviceList, device->next, device));
TRACE("Created device %p\n", device);
return device;
@@ -2309,7 +2309,7 @@ ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context)
return ALC_FALSE;
}
/* context's reference count is already incremented */
- context = ExchangePtr((void**)&GlobalContext, context);
+ context = ExchangePtr((XchgPtr*)&GlobalContext, context);
if(context) ALCcontext_DecRef(context);
if((context=pthread_getspecific(LocalContext)) != NULL)
@@ -2509,7 +2509,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
do {
device->next = DeviceList;
- } while(!CompExchangePtr((void**)&DeviceList, device->next, device));
+ } while(!CompExchangePtr((XchgPtr*)&DeviceList, device->next, device));
TRACE("Created device %p\n", device);
return device;
@@ -2623,7 +2623,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(void)
ALCdevice_OpenPlayback(device, "Loopback");
do {
device->next = DeviceList;
- } while(!CompExchangePtr((void**)&DeviceList, device->next, device));
+ } while(!CompExchangePtr((XchgPtr*)&DeviceList, device->next, device));
TRACE("Created device %p\n", device);
return device;
@@ -2689,7 +2689,7 @@ static void ReleaseALC(void)
free(alcCaptureDefaultDeviceSpecifier);
alcCaptureDefaultDeviceSpecifier = NULL;
- if((dev=ExchangePtr((void**)&DeviceList, NULL)) != NULL)
+ if((dev=ExchangePtr((XchgPtr*)&DeviceList, NULL)) != NULL)
{
ALCuint num = 0;
do {