This is the mail archive of the
mailing list for the GCC project.
Re: Optimization of conditional access to globals: thread-unsafe?
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