diff options
| author | Ivan Maidanski <ivmai@mail.ru> | 2016-08-20 17:46:48 +0300 |
|---|---|---|
| committer | Ivan Maidanski <ivmai@mail.ru> | 2016-08-20 17:46:48 +0300 |
| commit | f6a1b686f03aa801ebed7a1799e62849a31b1d37 (patch) | |
| tree | 00194110fd5e170b0a222fa02648dcdbbaebec08 /src | |
| parent | 56a3f6d85600c08e0584684a9f15ccf283c53890 (diff) | |
| download | libatomic_ops-f6a1b686f03aa801ebed7a1799e62849a31b1d37.tar.gz | |
Use C11 double-wide atomic intrinsics for Clang/x86 on Cygwin and OS X
Others (e.g., NDK clang/i686) still might need -latomic linker option.
* src/atomic_ops/sysdeps/gcc/x86.h
[AO_GCC_ATOMIC_TEST_AND_SET && __clang__]: Do not fallback to
non-intrinsic implementation if __APPLE_CC__ or __CYGWIN__.
Diffstat (limited to 'src')
| -rw-r--r-- | src/atomic_ops/sysdeps/gcc/x86.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atomic_ops/sysdeps/gcc/x86.h b/src/atomic_ops/sysdeps/gcc/x86.h index 5e54155..344b78a 100644 --- a/src/atomic_ops/sysdeps/gcc/x86.h +++ b/src/atomic_ops/sysdeps/gcc/x86.h @@ -292,7 +292,8 @@ AO_fetch_compare_and_swap_full(volatile AO_t *addr, AO_t old_val, #endif /* AO_DISABLE_GCC_ATOMICS */ #if (defined(AO_PREFER_BUILTIN_ATOMICS) || !defined(__clang__) \ - || defined(__x86_64__)) && defined(AO_GCC_ATOMIC_TEST_AND_SET) + || defined(__x86_64__) || defined(__APPLE_CC__) || defined(__CYGWIN__)) \ + && defined(AO_GCC_ATOMIC_TEST_AND_SET) /* As of clang-3.8 i686 (NDK r11c), it requires -latomic for all the */ /* double-wide operations. For now, we fall back to the */ |
