Subj : Re: Memory visibility with Pthreads To : comp.programming.threads From : Alexander Terekhov Date : Thu Aug 11 2005 11:46 am David Schwartz wrote: [...] > > lock > > B = 10; > > unlock > > A = 10; [...] > However, if the other thread does: > > if(A==10) it also triggers undefined behavior (in absence of synchronization regarding access to A's "memory location(s)" that ensures "that no thread of control can read or modify a memory location while another thread of control may be modifying it"). regards, alexander. .