This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ and race detectors
On 13 July 2010 16:14, Kostya Serebryany wrote:
> Index: include/bits/basic_string.h
> ===================================================================
> --- include/bits/basic_string.h (revision 162071)
> +++ include/bits/basic_string.h (working copy)
> @@ -232,8 +232,7 @@
> ?#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
> ? ? ? ? ?if (__builtin_expect(this != &_S_empty_rep(), false))
> ?#endif
> - ? ? ? ? ? if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?-1) <= 0)
> + ? ? ? ? ? ?if
> (__gnu_cxx::__decrement_reference_count(&this->_M_refcount) <= 0)
> ? ? ? ? ? ? ?_M_destroy(__a);
> ? ? ? ?} ?// XXX MT
Can the macros be put directly here? Is a new function needed?