Optimization of conditional access to globals: thread-unsafe?
Tomash Brechko
tomash.brechko@gmail.com
Mon Oct 29 09:12:00 GMT 2007
On Mon, Oct 29, 2007 at 11:55:25 +0300, Tomash Brechko wrote:
> OK, formally there's no "final" value from current thread's POV, only
> the "current" value. "Final" only matters from other thread's POV,
> like "this is the last value that was produced by another thread
> before it released the mutex".
Rather, "...before it released the mutex, and we acuired the same
mutex". But it may be the same thread actually, so "final value" is
the value that is seen by the thread at the beginning of excusive
access to the object. It is "final" wrt previous exclusive access to
this object.
--
Tomash Brechko
More information about the Gcc
mailing list