search for: osatomicincrement32

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

Did you mean: osatomicdecrement32
2012 Feb 28
0
[LLVMdev] [patch] atomic functions on darwin
...ONG val = 1; @@ -13,6 +16,12 @@ 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/...