From: Benjamin Kosnik Date: Thu, 30 Aug 2012 19:24:58 +0000 (+0000) Subject: PR libstdc++/54005 continued X-Git-Tag: misc/gccgo-go1_1_2~1120 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=3e7e2f128b37eb96c621217afc8375b5a72144e3;p=gcc.git PR libstdc++/54005 continued 2012-08-30 Benjamin Kosnik PR libstdc++/54005 continued * include/std/atomic: Use __atomic_lock_free with * include/bits/atomic_base.h: Same. From-SVN: r190810 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 74ee2f5365b6..9544c2fb1907 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -3,6 +3,12 @@ * include/bits/random.h (random_device) [GLIBCXX_USE_RANDOM_TR1]: Remove 'return' from constructor. +2012-08-30 Benjamin Kosnik + + PR libstdc++/54005 continued + * include/std/atomic: Use __atomic_lock_free with + * include/bits/atomic_base.h: Same. + 2012-08-30 Benjamin Kosnik * testsuite/util/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.18. diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 598e1f1e9457..de098a3c40b1 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -35,6 +35,7 @@ #include #include #include +#include #include namespace std _GLIBCXX_VISIBILITY(default) @@ -422,11 +423,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_always_lock_free(sizeof(_M_i), &_M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } bool is_lock_free() const volatile noexcept - { return __atomic_always_lock_free(sizeof(_M_i), &_M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } void store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept @@ -716,11 +717,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_always_lock_free(_M_type_size(1), &_M_p); } + { return __atomic_is_lock_free(_M_type_size(1), NULL); } bool is_lock_free() const volatile noexcept - { return __atomic_always_lock_free(_M_type_size(1), &_M_p); } + { return __atomic_is_lock_free(_M_type_size(1), NULL); } void store(__pointer_type __p, diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index b5ca60621e5f..535a90f582ed 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -184,11 +184,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_always_lock_free(sizeof(_M_i), &_M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } bool is_lock_free() const volatile noexcept - { return __atomic_always_lock_free(sizeof(_M_i), &_M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } void store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept