[cpp-threads] A question about N2153

Peter Dimov pdimov at mmltd.net
Fri Jan 19 15:32:19 GMT 2007


Raul Silvera wrote:

> In this case, what you really want is an acquire fence that applies
> only to ref_count.

Yes, I was driving at that, the fences are locationless.

> That would be better than a load_acquire, because
> it doesn't imply a reload of the variable.

The reload can be optimized out in principle; I'm more concerned about 
whether load_acquire( &x ) is guaranteed by the specification to have the 
same semantics as an acquire_fence( &x ) in this case (following a 
RMW_release( &x )). 




More information about the cpp-threads mailing list