2005-11-10 Paolo Carlini <pcarlini@suse.de>
* include/tr1/boost_shared_ptr.h (_Sp_counted_base::release,
weak_release): Protect barriers with __GTHREADS.
From-SVN: r106733
+2005-11-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/boost_shared_ptr.h (_Sp_counted_base::release,
+ weak_release): Protect barriers with __GTHREADS.
+
2005-11-10 Paolo Carlini <pcarlini@suse.de>
Peter Dimov <pdimov@mmltd.net>
if (__gnu_cxx::__exchange_and_add(&_M_use_count, -1) == 1)
{
dispose();
-
+#ifdef __GTHREADS
_GLIBCXX_READ_MEM_BARRIER;
_GLIBCXX_WRITE_MEM_BARRIER;
-
+#endif
if (__gnu_cxx::__exchange_and_add(&_M_weak_count, -1) == 1)
destroy();
}
{
if (__gnu_cxx::__exchange_and_add(&_M_weak_count, -1) == 1)
{
+#ifdef __GTHREADS
_GLIBCXX_READ_MEM_BARRIER;
_GLIBCXX_WRITE_MEM_BARRIER;
+#endif
destroy();
}
}
{ return _M_pi ? _M_pi->get_deleter(__ti) : 0; }
};
-
class weak_count
{
private:
__throw_bad_weak_ptr();
}
+
// fwd decls
template<typename _Tp>
class weak_ptr;
#endif
} // XXX MT
-
long
use_count() const // never throws
{ return _M_refcount.use_count(); }