Subj : Re: What does Memory Barriers mean ?? To : comp.programming.threads From : David Schwartz Date : Thu Jan 13 2005 09:50 am "David Hopwood" wrote in message news:fOYEd.104229$48.77525@fe1.news.blueyonder.co.uk... > If you mean that, in principle, implementations *should* provide > sufficient > and accurate documentation of all their calling conventions and how > optimizations interact with them in the case of multithreaded code, > then who could disagree? If you mean that they are in fact so documented > (for example in the case of VC++ and gcc), then I definitely disagree. I am saying they are sufficiently documented such that unless you're trying to do something that you really have no business doing, you can be assured that your code will work at every optimization level. Have you ever know this not to work: functionmutex.Lock(); call_assembly_function(); functionmutex.Unlock(); DS .