[cpp-threads] Failed compare-and-swap
Bronek Kozicki
brok at spamcop.net
Fri Aug 3 08:00:21 BST 2007
Nelson, Clark wrote:
>> Are there any objections to the following compare-and-swap?
>> Basically, it adds another parameter specifying the memory
>> synchronization for the load-only-write-did-not-happen case.
>
> Are there reasonable ways on existing implementations to implement the
> full flexibility of this? It seems pretty inventive to me.
it struck me as well. If we replace enums with typetags (e.g.
std::memory_order_seq_cst a'la std::nothrow ), we might define only
small subset of valid combinations and leave the rest for implementators
to define (if they wish so).
B.
More information about the cpp-threads
mailing list