Subj : Re: posix and lock-free algorithms To : comp.programming.threads From : Joe Seigh Date : Thu Aug 11 2005 10:58 pm David Schwartz wrote: > "Joe Seigh" wrote in message > news:WIWdnSwafL7Ma2bfRVn-qw@comcast.com... >>I notice there is tendency for some people to define semantics in terms of >>some >>arbitrary implementation and confusing one with the other. So for >>example, if >>the only way you knew of to implement a lock was with memory barriers then >>you >>might think that locks are defined as having memory barriers. > > > I'm not doing that. I'm saying, in the absence of any other wording, > there is no plausible understanding of "synchronize memory" except that at > least loads and stores aren't reordered. More might be needed on platforms > where there are other ways memory can be unsychronized. I think it would depend on the particular function what "synchronize memory" means. I can think of some implementations where some of the Posix functions would be a no op and allow memory accesses to be reordered by the compiler and or hardware. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .