Subj : Re: posix and lock-free algorithms To : comp.programming.threads From : Sean Kelly Date : Thu Aug 04 2005 12:50 pm David Schwartz wrote: > > "David Hopwood" wrote in message > news:OLqIe.861$ia4.479@fe1.news.blueyonder.co.uk... > > > "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." > > That still bites you. Out of curiosity, is this a rule that is always adhered to or do some folks bend the rules if they're targeting specific hardware? In other words, if I wrote inline asm on a POSIX system that code contained memory ordering instructions, how likely is it that the code block would not behave as intended? Basically, I'm wondering whether/how anyone does lockless programming on such systems if the spec makes no guarantees about correct behavior. Sean .