* [v3] libstdc++/45398
@ 2010-09-07 14:30 Paolo Carlini
0 siblings, 0 replies; only message in thread
From: Paolo Carlini @ 2010-09-07 14:30 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++
[-- Attachment #1: Type: text/plain, Size: 96 bytes --]
Hi,
applied mainline and 4_5-branch. Tested x86_64-linux.
Paolo.
///////////////////////////
[-- Attachment #2: CL_45398 --]
[-- Type: text/plain, Size: 198 bytes --]
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.
[-- Attachment #3: patch_45398 --]
[-- Type: text/plain, Size: 1441 bytes --]
Index: include/std/atomic
===================================================================
--- include/std/atomic (revision 163946)
+++ include/std/atomic (working copy)
@@ -141,13 +141,16 @@
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,18 +490,7 @@
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,
memory_order __m2)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-07 14:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 14:30 [v3] libstdc++/45398 Paolo Carlini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).