[cpp-threads] Alternatives to SC

Chris Thomasson cristom at comcast.net
Sun Jan 21 08:02:19 GMT 2007


> [...]>>> P1: x = 1;
>>>> P2: if (x == 1) eieio(), y = 2;
>>>> P3: if (y == 2) isync(), assert(x == 1);
>> [...]
>>
>> Here is a trick you can do on the x86:
> [...]
>
Forgot to mention that this trick work with TSO... The fence variable takes
care of the visibility issues...

 So, you could use this technique on the UltraSPARC T1 as well because its
 TSO...


TSO basically means that every explicit memory barrier call is a NOP, except
 #StoreLoad...




More information about the cpp-threads mailing list