aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-09-07 14:05:23 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-09-07 14:05:23 +0000
commitb7c3f5eb21b9b4b4c6f6f16f8b24fe227a5782d4 (patch)
treebea0aeed97867d9500bb93d2267d5938a8dff32f
parent293cf2174de73c90a794f524ab83a64bc93d0aea (diff)
downloadgcc-b7c3f5eb21b9b4b4c6f6f16f8b24fe227a5782d4.zip
gcc-b7c3f5eb21b9b4b4c6f6f16f8b24fe227a5782d4.tar.gz
gcc-b7c3f5eb21b9b4b4c6f6f16f8b24fe227a5782d4.tar.bz2
re PR libstdc++/45398 ([C++0x] Missing atomic<_Tp*>::store definition)
2010-09-07 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/45398 * include/std/atomic (atomic<_TP*>::store): Define. * include/std/atomic (atomic<_TP*>::load, exchange): Define inline. From-SVN: r163950
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/std/atomic20
2 files changed, 13 insertions, 14 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f415c50..8689151 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/45398
+ * include/std/atomic (atomic<_TP*>::store): Define.
+
+ * include/std/atomic (atomic<_TP*>::load, exchange): Define inline.
+
2010-09-06 Jason Merrill <jason@redhat.com>
* testsuite/libstdc++-abi/abi.exp: Add "libstdc++-abi/" to
diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic
index d4f685c..c94597d 100644
--- a/libstdc++-v3/include/std/atomic
+++ b/libstdc++-v3/include/std/atomic
@@ -141,13 +141,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
atomic(_Tp* __v) : atomic_address(__v) { }
void
- store(_Tp*, memory_order = memory_order_seq_cst);
+ store(_Tp* __v, memory_order __m = memory_order_seq_cst)
+ { atomic_address::store(__v, __m); }
_Tp*
- load(memory_order = memory_order_seq_cst) const;
+ load(memory_order __m = memory_order_seq_cst) const
+ { return static_cast<_Tp*>(atomic_address::load(__m)); }
_Tp*
- exchange(_Tp*, memory_order = memory_order_seq_cst);
+ exchange(_Tp* __v, memory_order __m = memory_order_seq_cst)
+ { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); }
bool
compare_exchange_weak(_Tp*&, _Tp*, memory_order, memory_order);
@@ -487,17 +490,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
using __base_type::operator=;
};
-
- template<typename _Tp>
- _Tp*
- atomic<_Tp*>::load(memory_order __m) const
- { return static_cast<_Tp*>(atomic_address::load(__m)); }
-
- template<typename _Tp>
- _Tp*
- atomic<_Tp*>::exchange(_Tp* __v, memory_order __m)
- { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); }
-
template<typename _Tp>
bool
atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v, memory_order __m1,