[cpp-threads] modes, pass 2
Doug Lea
dl at cs.oswego.edu
Mon May 9 11:22:51 BST 2005
Alexander Terekhov wrote:
> On 5/8/05, Doug Lea <dl at cs.oswego.edu> wrote:
> [...]
>
>>The "ordered" suffix needs a better name, but the intent
>>is that it is the lightest barrier (often no-op) that
>>prevents re-orderings of successive loads (for get_ordered)
>>or stores (for set_ordered) or operations on the same
>>variable (for CAS_ordered).
>
>
> I think it's implied on all existing hardware.
Right (except possibly one case on Alpha); thanks. I realized this
yesterday. Stay tuned for pass 3.
> As for dd and cc... okay, let's mandate
> cchsb for all loads, but keep the rest.
Be prepared to fight for them one by one :-) As in...
> [...]
>
>>> Infallible CAS: do { if( LL() != old ) return false; } while( !SC(new) );
>>> return true;
>>> Fallible CAS: return LL() == old && SC(new);
>
>
> I'd rather expose (compile time feature testing required) LL/LR and SC.
>
Requiring feature testing is a really terrible thing for a standard.
Show me cases that you think demand doing it.
-Doug
More information about the cpp-threads
mailing list