[cpp-threads] Failed compare-and-swap

Boehm, Hans hans.boehm at hp.com
Thu Aug 2 22:35:57 BST 2007


> -----Original Message-----
> From: cpp-threads-bounces at decadentplace.org.uk 
> [mailto:cpp-threads-bounces at decadentplace.org.uk] On Behalf 
> Of Lawrence Crowl
> Sent: Thursday, August 02, 2007 1:53 PM
> To: paulmck at linux.vnet.ibm.com; C++ threads standardisation
> Subject: Re: [cpp-threads] Failed compare-and-swap
> 
> On 8/2/07, Paul E. McKenney <paulmck at linux.vnet.ibm.com> wrote:
> > How about a "memory_order_unspecified", so that the failure_order 
> > would by default follow the success_order?
> 
> I don't much like introducing a non-ground value into the 
> memory order enumeration. ...

Does it make sense to use an additional overload instead of a default
value, so that failure_order can effectively default to success_order?
I think that's clearly the correct default for

seq_cst, relaxed, and release

since release becomes vacuous in the failure case, since there is no
store.

Hans



More information about the cpp-threads mailing list