diff options
author | Owen Anderson <resistor@mac.com> | 2009-06-17 00:13:00 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-06-17 00:13:00 +0000 |
commit | 9a3df671ab49db61ef6234cf90b7ea7dc2a53917 (patch) | |
tree | 3da7419e06a5b3fe7e8293549c75907e8b1257f1 /autoconf | |
parent | 142fb2acdd4b94a73e2c992b9ed57ee1449ab818 (diff) | |
download | external_llvm-9a3df671ab49db61ef6234cf90b7ea7dc2a53917.zip external_llvm-9a3df671ab49db61ef6234cf90b7ea7dc2a53917.tar.gz external_llvm-9a3df671ab49db61ef6234cf90b7ea7dc2a53917.tar.bz2 |
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 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 828e558..4ba6b2b 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -935,6 +935,8 @@ AC_LINK_IFELSE( volatile unsigned long val = 1; __sync_synchronize(); __sync_val_compare_and_swap(&val, 1, 0); + __sync_add_and_fetch(&val, 1); + __sync_sub_and_fetch(&val, 1); return 0; } ]]), |