[cpp-threads] modes, interlude

Doug Lea dl at cs.oswego.edu
Tue May 10 00:07:05 BST 2005


> I may submit a prototype of the above for consideration if there is interest 
> in pursuing this approach.

Please go ahead. If we are orthoganizing all possibilities,
consider parameterizing as something like:
   load(allow_reordering pre, allow_reordering post)
   store(T val, allow_reordering pre, allow_reordering post)
and similarly for cas etc.

where enum allow_reordering is just { none, loads, stores, both }

This avoids weird acronyms like "hlb" at the price of more verbosity.

If we are going to do this, is there any reason not go all the way and
have four flavors of explicit barrier functions in the atomic classes
and not bother adding modes to load, store etc?


-Doug




More information about the cpp-threads mailing list