diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-29 21:51:33 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-29 21:51:33 +0000 |
commit | ca402b961dcf81f1983c5da8d694aa4101daa216 (patch) | |
tree | 0f19537a2dc9c7dbb62cfb5a095bdeca54de8d48 /gcc-4.8/libstdc++-v3/include/ext/atomicity.h | |
parent | 3366b351322dd21a54abe0f78177e72f963f573c (diff) | |
parent | d7c9c7963a79b60e2247bd5a41decc80938023f4 (diff) | |
download | toolchain_gcc-ca402b961dcf81f1983c5da8d694aa4101daa216.tar.gz toolchain_gcc-ca402b961dcf81f1983c5da8d694aa4101daa216.tar.bz2 toolchain_gcc-ca402b961dcf81f1983c5da8d694aa4101daa216.zip |
Merge "Fix GNU4.7/4.8/4.9 libstdc++ for clang"
Diffstat (limited to 'gcc-4.8/libstdc++-v3/include/ext/atomicity.h')
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/ext/atomicity.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc-4.8/libstdc++-v3/include/ext/atomicity.h b/gcc-4.8/libstdc++-v3/include/ext/atomicity.h index 88698bbe3..6139c9346 100644 --- a/gcc-4.8/libstdc++-v3/include/ext/atomicity.h +++ b/gcc-4.8/libstdc++-v3/include/ext/atomicity.h @@ -43,9 +43,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // To abstract locking primitives across all thread policies, use: // __exchange_and_add_dispatch // __atomic_add_dispatch -#if defined(_GLIBCXX_ATOMIC_BUILTINS) && (!defined(__clang__) || defined(__i386__)) - // NOTE: clang arm/mips can't compile the following two library calls yet. - static inline _Atomic_word +#ifdef _GLIBCXX_ATOMIC_BUILTINS + static inline _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } |