Daniel Jacobowitz wrote on 27 August 2008 16:15: > On Wed, Aug 27, 2008 at 02:45:25PM +0100, Dave Korn wrote: >> Jay wrote on 27 August 2008 09:55: >> >>> Yeah that's probably ok. >>> Volatile is enough to force the ordering? >> >> Absolutely; it's a defined part of the standard that all volatile >> side-effects must complete in-order. GCC will not move code past a >> volatile operation. > > It's still not sufficient without a memory barrier.
Yes, you're right. Of course, if we just don't cache mask at all, the problem goes away. cheers, DaveK -- Can't think of a witty .sigline today....