[cpp-threads] memory model

Doug Lea dl at cs.oswego.edu
Mon May 2 17:50:53 BST 2005


> 
> I can think of no interesting cases where an optimizer can turn acq into 
> ddacq or ccacq.
> 

Oh, sorry. Now I get it. I was thinking in terms of Java atomics
that refine/extend volatile semantics. C++ atomics
don't do that, which does give more flexibility, but
you are right that there are now a lot of potential modes.

Not that I have any ideas about it at the moment, but
I'd hope that there's a way to do this that reflects
semantic constraints rather than serving so explicitly
as barrier directives. It would be good to avoid over-specifying
these in a way that would be incompatible with machine-level
lock-speculation, transactional memory and related stuff that
now seems to be getting the attention of hardware designers.

-Doug









More information about the cpp-threads mailing list