diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-13 21:30:31 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-13 21:30:31 +0000 |
| commit | 49ba6a35776ad54d2b9be833992b49454a09baac (patch) | |
| tree | 840fce549883497ba5e22c723942237b1faa64ab /libstdc++-v3/include/parallel | |
| parent | 533ae4c77118bd0207bdfe2803dce26cc284b8ad (diff) | |
| download | ppe42-gcc-49ba6a35776ad54d2b9be833992b49454a09baac.tar.gz ppe42-gcc-49ba6a35776ad54d2b9be833992b49454a09baac.zip | |
PR libstdc++/51798 continued
* include/bits/shared_ptr_base.h
(_Sp_counted_base<_S_atomic>::_M_add_ref_lock): Hoist initial load
outside compare_exchange loop.
* include/tr1/shared_ptr.h: Same.
* include/parallel/compatibility.h (__compare_and_swap_32): Use strong
version of compare_exchange.
(__compare_and_swap_64): Same.
* include/profile/impl/profiler_state.h (__gnu_profile::__turn): Same.
* libsupc++/guard.cc (__cxa_guard_acquire): Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184171 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/parallel')
| -rw-r--r-- | libstdc++-v3/include/parallel/compatibility.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libstdc++-v3/include/parallel/compatibility.h b/libstdc++-v3/include/parallel/compatibility.h index 460345ef399..ed75215ceaf 100644 --- a/libstdc++-v3/include/parallel/compatibility.h +++ b/libstdc++-v3/include/parallel/compatibility.h @@ -252,8 +252,9 @@ namespace __gnu_parallel __replacement, __comparand) == __comparand; #elif defined(__GNUC__) - return __atomic_compare_exchange_n(__ptr, &__comparand, __replacement, true, - __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); + return __atomic_compare_exchange_n(__ptr, &__comparand, __replacement, + false, __ATOMIC_ACQ_REL, + __ATOMIC_RELAXED); #elif defined(__SUNPRO_CC) && defined(__sparc) return atomic_cas_32((volatile unsigned int*)__ptr, __comparand, __replacement) == __comparand; @@ -299,13 +300,15 @@ namespace __gnu_parallel #endif #elif defined(__GNUC__) && defined(__x86_64) - return __atomic_compare_exchange_n(__ptr, &__comparand, __replacement, true, - __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); + return __atomic_compare_exchange_n(__ptr, &__comparand, __replacement, + false, __ATOMIC_ACQ_REL, + __ATOMIC_RELAXED); #elif defined(__GNUC__) && defined(__i386) && \ (defined(__i686) || defined(__pentium4) || defined(__athlon) \ || defined(__k8) || defined(__core2)) - return __atomic_compare_exchange_n(__ptr, &__comparand, __replacement, true, - __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); + return __atomic_compare_exchange_n(__ptr, &__comparand, __replacement, + false, __ATOMIC_ACQ_REL, + __ATOMIC_RELAXED); #elif defined(__SUNPRO_CC) && defined(__sparc) return atomic_cas_64((volatile unsigned long long*)__ptr, __comparand, __replacement) == __comparand; |

