Subj : Re: sync vs. eieio on powerpc To : comp.programming.threads From : Joe Seigh Date : Tue Mar 01 2005 09:00 am On Tue, 01 Mar 2005 14:37:09 +0100, Alexander Terekhov wrote: > > Joe Seigh wrote: > [...] >> > Nope. You can have ordinary loads in between LR and SC+isync. They >> > are unordered (data and control dependencies aside for a moment). And >> > think of moving isync above SC (which is a store, not a load). >> > >> >> That's what I said. > > No. SC+isync != isync+SC, so to speak. > isync is not a store/store when used with store conditional, e.g. if one thread does stwcx isync stw and another does lwz isync lwz it is not guaranteed to see that the stores were performed in order. A commit is not the same as becoming visible to other processors. It is a really bad idea to define isync as an "acquire" barrier even though it may appear to work as one in certain situations. -- Joe Seigh .