2012-08-30 Thiago Macieira <thiago.macieira@intel.com>
* libsupc++/guard.cc (__cxa_guard_acquire): must use acquire semantics
in case of failure, to acquire changes done by the other thread
---
libstdc++-v3/libsupc++/guard.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -253,7 +253,7 @@ namespace __cxxabiv1
int expected(0);
if (__atomic_compare_exchange_n(gi, &expected, pending_bit, false,
__ATOMIC_ACQ_REL,
- __ATOMIC_RELAXED))
+ __ATOMIC_ACQUIRE))
{
// This thread should do the initialization.
return 1;
--
1.7.11.4