memory, [...]: Use mutex to make _Sp_counted_base::add_ref_lock() thread-safe.
authorJonathan Wakely <redi@gcc.gnu.org>
Tue, 5 Apr 2005 11:08:55 +0000 (12:08 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 5 Apr 2005 11:08:55 +0000 (12:08 +0100)
commitfcec20a7581be7e4a1aa34a4ce0f0316ba03d690
treecd11923f6c07d5cfe3ca28c23d7985b110a02994
parent1de2bc2a007b2a724960d20dd6bc7585ef6fe092
memory, [...]: Use mutex to make _Sp_counted_base::add_ref_lock() thread-safe.

* include/tr1/memory, include/tr1/boost_shared_ptr.h: Use mutex
to make _Sp_counted_base::add_ref_lock() thread-safe. Check whether
to destroy resources by testing for equality, not inequality. Add
empty critical sections to solve memory visibility issues.
* testsuite/tr1/2_general_utilities/memory/
shared_ptr/cons/auto_ptr_neg.cc: Use dg-excess-errors instead of
explicitly listing line numbers which need to be kept in sync.
* testsuite/tr1/2_general_utilities/memory/
shared_ptr/assign/auto_ptr_neg.cc: Same.
* testsuite/tr1/2_general_utilities/memory/
shared_ptr/assign/auto_ptr_rvalue_neg.cc: Same.
* testsuite/tr1/2_general_utilities/memory/
shared_ptr/cons/weak_ptr_expired.cc: Make XFAIL for consistency when
-fno-exceptions.
* testsuite/tr1/2_general_utilities/memory/
enable_shared_from_this/not_shared.cc: Add explanatory comments.
* testsuite/tr1/2_general_utilities/memory/
enable_shared_from_this/not_shared2.cc: Same.
* testsuite/tr1/2_general_utilities/memory/
enable_shared_from_this/not_shared3.cc: Same.

From-SVN: r97620
libstdc++-v3/ChangeLog
libstdc++-v3/include/tr1/boost_shared_ptr.h
libstdc++-v3/include/tr1/memory
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/auto_ptr_neg.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/auto_ptr_rvalue_neg.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/weak_ptr_expired.cc