[cpp-threads] Brief example ITANIUM Implementation for C/C++ MemoryModel

Paul E. McKenney paulmck at linux.vnet.ibm.com
Fri Jan 2 17:34:19 GMT 2009


On Tue, Dec 30, 2008 at 08:01:01PM -0500, Doug Lea wrote:
> Hans Boehm wrote:
> 
> >>
> > The seq_cst operations must effectively ensure that data-race-free
> > programs using only seq_cst operations behave sequentially consistently.
> 
> I wonder if a better naming scheme is available.
> Probably some programmers will think along the lines:
>    I'm using atomics to temporarily break sequential
>    consistency. So if I want to get it back wrt this
>    variable upon this load, I should use seq_cst mode.
> Which is of course not what it does. But apparently Alexander
> thought it should, and surely others will make the same
> misinterpretation.
> 
> Maybe distinguish modes maintain_seq_cst vs establish_seq_cst?
> Or some better names along those lines.

My thought was that this is one of the applications of addressless
fences -- put an seq_cst fence at each such "mode switch" if desired.

						Thanx, Paul



More information about the cpp-threads mailing list