This is the mail archive of the
mailing list for the GCC project.
Re: Optimization of conditional access to globals: thread-unsafe?
Dave Korn wrote:
On 29 October 2007 01:38, David Miller wrote:Why would David ask for something so unreasonable?
You'll be back. Next week, you'll discover a corner case where caching a
shared variable in a register can be a bad thing when one thread uses locks
and the other doesn't, and you'll be back to demand that optimisation is
removed as well.
Why do you believe that the use of mutex to synchronize access to a
shared resource, without the use of volatile on the shared resource
being accessed, as documented in countless real life examples, is
unreasonable or incorrect?
I do not understand your position.
Mark Mielke <email@example.com>