Subj : Re: posix and lock-free algorithms To : comp.programming.threads From : David Hopwood Date : Sat Aug 13 2005 12:33 am David Schwartz wrote: > "David Hopwood" wrote: > >>Wrong. Let's look again at the precise wording: >> >> Applications shall ensure that access to any memory location by more >> than one thread of control (threads or processes) is restricted such >> that no thread of control can read or modify a memory location while >> another thread of control may be modifying it. > > The whole premise of this thread was that we were ignoring this > paragraph. If the paragraph is ignored, then what replaces it in order to specify the semantics of the concurrent accesses that were previously undefined? POSIX is able to (just about) get away with not defining a memory model, only because this paragraph effectively hides the differences between plausible memory models. That is, given that programs with data races have undefined behaviour, models such as sequential consistency, release consistency, etc. coincide for other programs. Without this paragraph or any replacement, the specification would be simply incoherent. -- David Hopwood .