[cpp-threads] New strawman proposal

Peter Dimov pdimov at mmltd.net
Wed Jun 8 18:22:05 BST 2005


Boehm, Hans wrote:
> What do you mean by "granular atomics"?

Atomics that prevent reordering of only reads or only writes. For example, 
if thread 1 does

    read z;
    x = 0;
    store.ssb Y

and thread 2 does

    load.hlb Y
    read x;
    z = 0;

there is a happens-before for the writes in T1 before the store.ssb and the 
reads in T2 after the load.hlb, but there is no such happens-before for 
reads in T1 and writes in T2.

So "read z" and "z = 0" are unordered, even though "read z" happens before 
"x = 0", "x = 0" happens before "read x", and "read x" happens before "z = 
0". 





More information about the cpp-threads mailing list