diff options
author | Chris Robinson <[email protected]> | 2011-09-11 09:39:29 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-11 09:39:29 -0700 |
commit | b4cbb3380a750761aa0a80ab6a326bc99134109d (patch) | |
tree | 10603f810af33da01499a8190dc985d179f87795 /OpenAL32/Include/alMain.h | |
parent | d9cb2baf4a99e691d63470f901cfb5c1fbb3e482 (diff) |
Fix non-GCC CompExchangePtr implementations
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 3d030f94..f624cc09 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -278,9 +278,9 @@ static __inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int new } u = { ptr }; return InterlockedCompareExchange(u.l, newval, oldval) == oldval; } -static __inline void *CompExchangePtr(void *volatile*ptr, void *oldval, void *newval) +static __inline ALboolean CompExchangePtr(void *volatile*ptr, void *oldval, void *newval) { - return InterlockedCompareExchangePointer(ptr, newval, oldval); + return InterlockedCompareExchangePointer(ptr, newval, oldval) == oldval; } #elif defined(__APPLE__) @@ -314,7 +314,7 @@ static __inline ALboolean CompExchangeInt(volatile int *ptr, int oldval, int new { return OSAtomicCompareAndSwap32Barrier(oldval, newval, ptr); } -static __inline ALboolean CompExchangeInt(void *volatile*ptr, void *oldval, void *newval) +static __inline ALboolean CompExchangePtr(void *volatile*ptr, void *oldval, void *newval) { return OSAtomicCompareAndSwapPtrBarrier(oldval, newval, ptr); } |