[cpp-threads] Re: volatile and barriers (especially on PPC)

Doug Lea dl at cs.oswego.edu
Sat Mar 12 18:07:52 GMT 2005


(Let's see if this list works...)

Peter wrote:

> Let's look at the C manual because C++ usually defers to C on these kinds of
> issues.
> 
> Section 6.7.2 "Type Qualifiers", point 6:

> Section 5.1.2.3 "Program execution"
> 

Thanks for locating the passages that will need overhaul!
Plus lots of others, I'm afraid. We must replace the single-threaded 
execution model language in the spec. Nothing short of this suffices.
(I'm hoping that others have the interest and stamina to
do this, because I plan to run away and hide when this
comes up :-)


> I believe what this is trying to say is that at some reasonable point (?)
> during execution data in the memory hierarchy has to be visible in the actual
> memory (where my term "actual memory" is nebulous). This is a good thing.

The basic idea with memory models these days is to avoid talking
about "actual memory" (which can be a fiction anyway), but instead
come up with sets of rules that processors and programmers must promise
to obey. All of these at some level turn out to concern orderings among
reads and writes. I'm reassured that the passages you cited seem to
be compatible with this, so there ought not be any objections about
legacy meanings of "volatile".


-Doug




-- 
cpp-threads mailing list
cpp-threads at decadentplace.org.uk
http://decadentplace.org.uk/mailman/listinfo/cpp-threads_decadentplace.org.uk






More information about the cpp-threads mailing list