[cpp-threads] Another strawman memory model proposal

Peter Dimov pdimov at mmltd.net
Mon May 9 13:04:26 BST 2005


>>> - 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.

[atomics omitted]

Forget it. The abstract machine is sequentially consistent; atomics aren't 
expressible without surgery. pthread_rwlock_rdlock isn't expressible, 
either.

The C++ memory model in SCNF is, in its entirety:

- 1.9/8 does not apply to functions that are executed in a separate thread.

- The second sentence of 1.9/17 does not apply to functions that are 
executed in a separate thread. 





More information about the cpp-threads mailing list