From 23725157c815e3fccfca988317624d7b0896e932 Mon Sep 17 00:00:00 2001 From: anonymous Date: Fri, 13 Aug 2010 14:45:34 +0000 Subject: Use __sync_bool_compare_and_swap_4 instead of __sync_bool_compare_and_swap to make life easier for pathcc people. --- src/guard.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/guard.cc') 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 -- cgit v1.2.3