re PR libstdc++/54172 (__cxa_guard_acquire thread-safety issue)

PR libstdc++/54172
	* libsupc++/guard.cc (__cxa_guard_acquire): Fix up the last
	argument of the first __atomic_compare_exchange_n.

From-SVN: r191190
This commit is contained in:
Jakub Jelinek 2012-09-11 17:22:54 +02:00 committed by Jakub Jelinek
parent 6211feb0ff
commit 635442bfd8
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-09-11 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/54172
* libsupc++/guard.cc (__cxa_guard_acquire): Fix up the last
argument of the first __atomic_compare_exchange_n.
2012-09-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jonathan Wakely <jwakely.gcc@gmail.com>

View File

@ -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;