re PR libstdc++/59215 (tsan: warning in shared_ptr_base.h)
PR libstdc++/59215 * include/bits/shared_ptr_base.h (_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic load. From-SVN: r207147
This commit is contained in:
parent
b1d1299619
commit
fb1ca954c0
@ -1,3 +1,10 @@
|
||||
2014-01-27 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/59215
|
||||
* include/bits/shared_ptr_base.h
|
||||
(_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic
|
||||
load.
|
||||
|
||||
2014-01-27 Jason Merrill <jason@redhat.com>
|
||||
|
||||
Core DR 475
|
||||
|
@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_M_add_ref_lock()
|
||||
{
|
||||
// Perform lock-free add-if-not-zero operation.
|
||||
_Atomic_word __count = _M_use_count;
|
||||
_Atomic_word __count = _M_get_use_count();
|
||||
do
|
||||
{
|
||||
if (__count == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user