[cpp-threads] Another strawman memory model proposal

Peter Dimov pdimov at mmltd.net
Sun May 8 18:41:51 BST 2005


Peter Dimov wrote:
> - There is a sequence point between unlock on a mutex and a
> subsequent lock on the same mutex.
>
> - 1.9/8 does not apply to functions that are executed in a separate
> thread. There is no sequence point between the end of such function
> and the evaluation of expressions outside this function.
>
> - There is a sequence point between the end of a function executed in
> a separate thread and a join action or a successful try_join action
> on that thread.
>
> - There is a sequence point between an atomic store and a subsequent
> atomic load of the same variable.

Too strong. Scratch that. Replace with:

- A scalar object can be modified more than once without an intervening 
sequence point if all modifications are atomic.

and:

- The value of a scalar object that is modified between two sequence points 
can be accessed more than once and for any purpose if the modifications and 
the accesses are atomic.

These are needed anyway to satisfy 5/4.

> - There is a sequence point immediately before an atomic operation
> with release semantics.
>
> - There is a sequence point immediately after an atomic operation with
> acquire semantics.





More information about the cpp-threads mailing list