[cpp-threads] modes, pass 2

Doug Lea dl at cs.oswego.edu
Mon May 9 12:55:46 BST 2005


Alexander Terekhov wrote:
> On 5/9/05, Peter Dimov <pdimov at mmltd.net> wrote:
> 
> [... isync ...]
> 
> 
>>it's a #loadload as well; it could be technically possible for an earlier
>>load to "sink" below a later load, even with an intervening isync. But the
>>Load Hit Load rule seems to prevent that; 
> 
> 
> How so? Load Hit Load is about "two loads to the same memory 
> location ... a store to the memory location from another 
> processor between the intervening loads ... younger load obtains 
> old data, the older load must not obtain new data". How's that 
> plus intervening isync can order load a -> load b is beyond me.
> 
> regrads,
> alexander.
> 

Even if that's so, then you should still be able to use isync
in combination with some form of the "if (x == x)" trick?
Considering that the only other alternative seems to be the
dreaded "sync" instruction, it would be extremely useful for
someone to come up with reliable cheap encoding of LoadLoad
barriers on PPC.

-Doug





More information about the cpp-threads mailing list