[cpp-threads] memory model

Jason Merrill jason at redhat.com
Fri Apr 29 19:18:37 BST 2005


On Fri, 29 Apr 2005 06:54:53 -0400, Doug Lea <dl at cs.oswego.edu> wrote:

> I guess the question here is who we are most afraid of offending:
>
>   * People who would be unhappy that providing semantics for
>     volatile might sometimes make existing usages more expensive
>
>   * People who would be unhappy adding another qualifier
>     to mean "accessible by multiple threads without a lock",
>     (that would in most cases have exactly the semantics
>     of volatile).
>
>   * People who would be unhappy to have to declare every
>     volatile-like variable using atomic templates (which
>     avoids keywords but is programmer-hostile.)
>
> Maybe we need a vote about this.

I like the qualifier idea a lot, I just think it can't be plain volatile
(unfortunately).  So my preference would be #2.

Jason




More information about the cpp-threads mailing list