[cpp-threads] modes
Doug Lea
dl at cs.oswego.edu
Sat May 7 17:57:07 BST 2005
>>
>>>Also, as always, I just don't think that explicit LL/SC is worth
>>>exposing. LL/SC instructions tend to have so many restrictions and
>>>quirks that the just about only thing it is good for is CAS/weakCAS
>>>emulation
>>
>>I disagree on both accounts.
>>
See previous post about CAS-acq. I acknowledge it is the leading
candidate for addition.
But I forgot to mention the further problem with LL/SC, that
you cannot emulate it with CAS (not without horrible overhead
anyway); while it is trivial and cheap to do the opposite. So you'd need
to somehow arrange for programs to be able to feature-test it. And
feature-testing should be a very-last resort.
(And anyway, I would be surprised if anything using emulated-CAS vs
LL/SC on a powerPC is even measurably slower, at least when used
in any realistic context.)
-Doug
More information about the cpp-threads
mailing list