[cpp-threads] Yet another visibility question

Lawrence Crowl Lawrence at Crowl.org
Thu Dec 14 22:25:51 GMT 2006


On 12/14/06, Peter Dimov <pdimov at mmltd.net> wrote:
> Lawrence Crowl wrote:
> > There are distinct types, no tagging.  That is, atomic_int is a
> > type name.
>
> Hmmm. I've my doubts about that, it doesn't scale.

More precisely, what is your concern?  I haven't told the whole story,
trying to actually get the paper out.  :-)

> Anyway, even under such a
> formulation, it still makes sense to me to not impose this requirement at
> memory model level; that is, not require TSO for all stores to the same
> atomic variable, but require TSO for all atomic stores to the same variable
> instead. This would leave you free to add a "non-competing store" operation
> for the atomic types if such an operation turns out to be needed (I remember
> Alexander Terekhov adding it to his atomic<> template at one point).

All operations on a variable must be atomic if any of them are to be atomic.
There is more than one kind of store operation in the proposal.

-- 
Lawrence Crowl



More information about the cpp-threads mailing list