Subj : Re: double-checked locking in C To : comp.programming.threads From : David Schwartz Date : Fri Jul 08 2005 03:53 pm "David Hopwood" wrote in message news:_yAze.11062$O22.8179@fe1.news.blueyonder.co.uk... > Indeed. The whole idea of 'volatile' in C is incoherent; the language > definition specifies by fiat that accesses to volatile objects are > always observable side effects, when in many cases they manifestly > are not. And it doesn't specify where or how they are to be observed when that can make all the difference in the world. An observer at the CPU instruction stream will see different things from an observer on another CPU who will see different things from an observer at the memory bus. The standard, phrased in terms of an abstract machine, never explains what "observable" means and how it relates to the "as if" rule in the case of 'volatile'. DS .