summaryrefslogtreecommitdiff
path: root/include/llvm/System/Atomic.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-17 00:13:00 +0000
committerOwen Anderson <resistor@mac.com>2009-06-17 00:13:00 +0000
commit9a3df671ab49db61ef6234cf90b7ea7dc2a53917 (patch)
tree3da7419e06a5b3fe7e8293549c75907e8b1257f1 /include/llvm/System/Atomic.h
parent142fb2acdd4b94a73e2c992b9ed57ee1449ab818 (diff)
downloadllvm-9a3df671ab49db61ef6234cf90b7ea7dc2a53917.tar.gz
llvm-9a3df671ab49db61ef6234cf90b7ea7dc2a53917.tar.bz2
llvm-9a3df671ab49db61ef6234cf90b7ea7dc2a53917.tar.xz
Add an atomic increment and decrement implementation, which will be used for
thread-safe reference counting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73587 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Atomic.h')
-rw-r--r--include/llvm/System/Atomic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/System/Atomic.h b/include/llvm/System/Atomic.h
index cb9277cc35..f90a8f62e1 100644
--- a/include/llvm/System/Atomic.h
+++ b/include/llvm/System/Atomic.h
@@ -24,6 +24,8 @@ namespace llvm {
cas_flag CompareAndSwap(volatile cas_flag* ptr,
cas_flag new_value,
cas_flag old_value);
+ cas_flag AtomicPostIncrement(volatile cas_flag* ptr);
+ cas_flag AtomicPostDecrement(volatile cas_flag* ptr);
}
}