[jmm-dev] jdk9 APIs (CAS)

Doug Lea dl at cs.oswego.edu
Thu Aug 20 12:27:49 UTC 2015


On 08/19/2015 07:44 AM, Doug Lea wrote:
>
> Thanks to Cliff Click for prodding me to realize that the signatures
> for new analogs of C/C++ moded CAS should, like those versions, return
> values not booleans (i.e, on failure, the value causing CAS to fail,
> else the given value).

And thanks to Andrew Haley for noticing that this is not desirable
for the "weak" versions that can spuriously fail. The C++ versions
both report boolean and set one of the arguments by-ref to hold
value, which we can't do. So I reverted these three (but renamed
weakCompareAndSet to weakCompareAndSetRelaxed for clarity).

-Doug




More information about the jmm-dev mailing list