[cpp-threads] modes

Peter Dimov pdimov at mmltd.net
Sat May 7 16:42:21 BST 2005


Doug Lea wrote:

> 2. There's very little motivation to define CAS-with-acquire only.

Isn't CAS with acquire on success the typical fast mutex lock path (and the 
entire trylock implementation, for that matter)?

As for cost, I think that acquire-only is less expensive on PPC since it 
only needs a trailing isync, without leading [lw]sync. 





More information about the cpp-threads mailing list