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
- To: Joe Buck <jbuck at Synopsys dot COM>
- Subject: Re: basic_string::release and thread safety: what about
- From: dvv at dvv dot ru (Dima Volodin)
- Date: Wed, 07 Jul 1999 00:06:00 GMT
- Cc: mark at codesourcery dot com, drepper at cygnus dot com, egcs at egcs dot cygnus dot com
- Organization: Huh?
- References: <199907062351.QAA13766@atrus.synopsys.com>
On Tue, 6 Jul 99 16:51:52 PDT, you wrote:
>
>> This "atomic" operations should also guarantee cache consistency between all
>> the CPUs in the system, so if you ask me (am I humble or what? :-) I'd rather
>> go with the approach taken by the SGI folks - have things shared as little as
>> possible.
>
>The atomic operations in question (hardware test-and-set instructions and
>the like) have that property (cache consistency). People need such
>primitives to build locks and critical regions.
The only problem is that all too often maintaining cache concistency is
way too expensive.
>I'm not willing to pay 10x or more speed penalties on uniprocessor,
>non-threaded code myself.
But of course. That's why on MT-capable systems run-time (NB!)
environment usually takes good care not to waste resources on
unnecessary things.
Dima