[cpp-threads] Web site updated

Paul E. McKenney paulmck at linux.vnet.ibm.com
Tue Feb 13 22:25:44 GMT 2007


On Tue, Feb 13, 2007 at 09:56:06PM +0200, Peter Dimov wrote:
> Paul E. McKenney wrote:
> 
> >>Similarly, I'd expect in
> >>
> >>a.store_raw( 5 );
> >>a.store_raw( 6 );
> >>
> >>the first store to be optimized out.
> >
> >MMIO accesses, anyone?
> 
> This is what volatile is for.

To the extent that it is defined...

> >Hardware timing analysis (especially if there is a short loop between the 
> >two)?
> 
> (1) A short loop composed of ordinary operations can be reordered across 
> either store;

Even though it is a special store_raw()?  This would prohibit implementations
of reference counts or locks based on store_raw().  There really needs to
be a primitive that prevents the compiler from reordering code for these
cases.

> (2) Only volatiles are "observable behavior". The compiler is not required 
> to care about timing on nonvolatiles, or it would be able to perform no 
> optimization at all. 

We are talking about changing the standard here, right?

								Thanx, Paul



More information about the cpp-threads mailing list