summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoranonymous <local@localhost>2010-08-13 14:45:34 +0000
committeranonymous <local@localhost>2010-08-13 14:45:34 +0000
commit23725157c815e3fccfca988317624d7b0896e932 (patch)
treed51fbd776a6292a704e98c6558ed82e48bb5f9ba /src
parent3fdd328c6cc79830f1635ed3126d042aad265297 (diff)
downloadlibcxxrt-23725157c815e3fccfca988317624d7b0896e932.tar.gz
libcxxrt-23725157c815e3fccfca988317624d7b0896e932.tar.bz2
libcxxrt-23725157c815e3fccfca988317624d7b0896e932.tar.xz
Use __sync_bool_compare_and_swap_4 instead of
__sync_bool_compare_and_swap to make life easier for pathcc people.
Diffstat (limited to 'src')
-rw-r--r--src/guard.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/guard.cc b/src/guard.cc
index 172af47..98f8a06 100644
--- a/src/guard.cc
+++ b/src/guard.cc
@@ -19,7 +19,7 @@ extern "C" int __cxa_guard_acquire(int64_t *guard_object)
char first_byte = (*guard_object) >> 56;
if (1 == first_byte) { return 0; }
int32_t *lock = low_32_bits(guard_object);
- while (!__sync_bool_compare_and_swap(lock, 0, 1))
+ while (!__sync_bool_compare_and_swap_4(lock, 0, 1))
{
// TODO: Use some of the remaining 24 bits to define a mutex to sleep
// on. Whether this is actually worth bothering with depends on