[cpp-threads] RE: volatile, memory models, threads

Nick Maclaren nmm1 at cus.cam.ac.uk
Thu Mar 2 19:05:49 GMT 2006


"Peter Dimov" <pdimov at mmltd.net> wrote:
>
> 2. making "atomic" a (non cv-) qualifier that can't be added implicitly, can 
> be casted away relatively safely, and can possibly be added via a cast 
> relatively unsafely.

The weakness of that is you then have to define ordering semantics
between atomic and non-atomic accesses to the same object.  It
doesn't help if you forbid it, because you have to defined WHAT
you are forbidding.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679



More information about the cpp-threads mailing list