[cpp-threads] New strawman proposal

Peter Dimov pdimov at mmltd.net
Wed Jun 8 14:08:15 BST 2005


Boehm, Hans wrote:
> I partially updated the strawman proposal accessible from
>
> http://www.hpl.hp.com/personal/Hans_Boehm/c++mm
>
> to reflect what I currently consider to be a more promising
> approach to describing the memory model.

I'll need some time to digest that, but just some quick comments:

"We define a canonical execution of a program thread to be one that is 
carried out according to the program execution rules in section 1.9, with 
the additional requirement that reads from variables (in addition to writes) 
may not be moved across sequence points."

Again, there is no such thing as "a read from a (non-volatile) variable". 
The statement is meaningless in the context of the C/C++ abstract machine 
description. Objects just hold their previous values until modified.

This also affects later parts of the spec where "loads" are mentioned. On 
abstract machine level, there are no loads of non-volatile objects.

"We define a candidate execution of a program to be a set of canonical 
executions of its threads, together with a mapping from shared variable 
accesses to the values read."

Use of "canonical" to mean "possible" aside, we probably need to specify 
when do the thread executions start or end relative to the program 
execution. 





More information about the cpp-threads mailing list