summaryrefslogtreecommitdiffstats
path: root/include/llvm/System/Atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/System/Atomic.h')
-rw-r--r--include/llvm/System/Atomic.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/System/Atomic.h b/include/llvm/System/Atomic.h
index c0612f9..4ec117b 100644
--- a/include/llvm/System/Atomic.h
+++ b/include/llvm/System/Atomic.h
@@ -20,14 +20,15 @@ namespace llvm {
namespace sys {
void MemoryFence();
- uint32_t CompareAndSwap32(volatile uint32_t* ptr,
- uint32_t new_value,
- uint32_t old_value);
- int32_t AtomicIncrement32(volatile int32_t* ptr);
- int32_t AtomicDecrement32(volatile int32_t* ptr);
- int32_t AtomicAdd32(volatile int32_t* ptr, int32_t val);
-
- int64_t AtomicAdd64(volatile int64_t* ptr, int64_t val);
+ typedef uint32_t cas_flag;
+ cas_flag CompareAndSwap(volatile cas_flag* ptr,
+ cas_flag new_value,
+ cas_flag old_value);
+ cas_flag AtomicIncrement(volatile cas_flag* ptr);
+ cas_flag AtomicDecrement(volatile cas_flag* ptr);
+ cas_flag AtomicAdd(volatile cas_flag* ptr, cas_flag val);
+ cas_flag AtomicMul(volatile cas_flag* ptr, cas_flag val);
+ cas_flag AtomicDiv(volatile cas_flag* ptr, cas_flag val);
}
}
OpenPOWER on IntegriCloud