mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Label the existing atomic functions as 32-bit specific, and add a 64-bit one that will be useful in
the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73971 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,13 +20,14 @@ namespace llvm {
|
||||
namespace sys {
|
||||
void MemoryFence();
|
||||
|
||||
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);
|
||||
uint32_t CompareAndSwap32(volatile uint32_t* ptr,
|
||||
uint32_t new_value,
|
||||
uint32_t old_value);
|
||||
uint32_t AtomicIncrement32(volatile uint32_t* ptr);
|
||||
uint32_t AtomicDecrement32(volatile uint32_t* ptr);
|
||||
uint32_t AtomicAdd32(volatile uint32_t* ptr, uint32_t val);
|
||||
|
||||
uint64_t AtomicAdd64(volatile uint64_t* ptr, uint64_t val);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user