This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic_string::release and thread safety: what about basic_string::grab?
- To: Benjamin Kosnik <bkoz at cygnus dot com>
- Subject: Re: basic_string::release and thread safety: what about basic_string::grab?
- From: dvv at dvv dot ru (Dima Volodin)
- Date: Tue, 06 Jul 1999 20:56:12 GMT
- Cc: egcs at egcs dot cygnus dot com
- Organization: Huh?
- References: <199907061737.KAA06992@atrus.synopsys.com> <37825F5F.74C8436B@cygnus.com>
See http://egcs.cygnus.com/ml/egcs-bugs/1999-02/msg00349.html The part
about "more than one cpu" is essential.
Dima
On Tue, 06 Jul 1999 12:56:15 -0700, you wrote:
>Joe Buck wrote:
>
>> The v2 version of basic_string::Rep::release has been changed to be
>> thread-safe on the x86 and sparc platforms by using atomic instructions
>> to decrement the reference count. However, basic_string::Rep::grab, which
>> increments the reference count, is not protected.
>
>I have a tangential topic related to this, since you've brought it up: how
>are these thread-safety issues with string coming to light? Can you post
>specific code samples to demonstrate or reproduce them? It would be nice if I
>could quickly see where both v-2 and v-3 stood, and since none of the
>commercial test suites explicitly test for MT-safe issues, I am left with
>this grab-bag of random test cases I've accumulated over the last year.
>
>Thanks,
>Benjamin
>
>
>
>