search for: osatomicdecrement32

Displaying 1 result from an estimated 1 matches for "osatomicdecrement32".

2012 Feb 28
0
[LLVMdev] [patch] atomic functions on darwin
...InterlockedCompareExchange(&val, 0, 1); InterlockedIncrement(&val); InterlockedDecrement(&val); +#elif defined(__APPLE__) + int32_t val = 1; + OSMemoryBarrier(); + OSAtomicCompareAndSwap32(0, 1, &val); + OSAtomicIncrement32(&val); + OSAtomicDecrement32(&val); #else volatile unsigned long val = 1; __sync_synchronize(); Index: include/llvm/Support/Atomic.h =================================================================== --- include/llvm/Support/Atomic.h (revision 151623) +++ include/llvm/Support/Atomic.h (working copy) @@...