[cpp-threads] memory model

Nelson, Clark clark.nelson at intel.com
Fri May 6 23:05:54 BST 2005


> The more I look at this, the less I understand what the actual model
> is here.  I expect we need to take this to the core list.  My
> fundamental problem is that the standard talks about the placement
> of sequence points in the "execution sequence".  But I think
> both of us believe that sequence points are meant to constrain
> the possible execution sequences.
> 
> An alternate interpretation seems to be that execution sequences are
> otherwise specified, and sequence points constrain the order in
> which "side effects" become visible to the outside world.  That seems
> to be closer to what the text actually states, but then I'm not sure
> that acceptable execution sequences are sufficiently specified.

I'm on the core list, and for what it's worth, I think Peter has it
right. That's a consequence of believing that the "least requirements on
a conforming implementation" really are the least requirements -- that
as long as an implementation obeys them, it conforms to the standard,
regardless what other expectations may not be satisfied.

I don't believe that every sequence point can be assumed to correspond
to some specific instant in the execution of an actual program. Instead
they are used to describe rules which constrain the visibility of side
effects in the abstract machine. By which you can eventually deduce the
observable behavior of the program according to the standard -- which is
all you can count on.

-- 
Clark Nelson		Vice chair, J16 (ANSI C++ standard committee)
Intel Corporation
clark.nelson at intel.com




More information about the cpp-threads mailing list