[jmm-dev] bitwise RMW operators, specifically testAndSetBit/BTS

Paul Sandoz paul.sandoz at oracle.com
Wed Jul 20 08:28:26 UTC 2016

> On 19 Jul 2016, at 20:56, John Rose <john.r.rose at oracle.com> wrote:
> On Jul 19, 2016, at 7:23 AM, Paul Sandoz <paul.sandoz at oracle.com <mailto:paul.sandoz at oracle.com>> wrote:
>> Here is an initial (and untested) webrev for those that might be interested:
>>  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8161444-vhs-bitwise-atomics/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8161444-vhs-bitwise-atomics/webrev/> <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8161444-vhs-bitwise-atomics/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8161444-vhs-bitwise-atomics/webrev/>>
> I like this very much.
> Mainly because it gives us single-bit atomics, but also because, with C++, it leans towards the newer ISAs.

Just to be clear i added a bunch of methods to Unsafe in the anticipation they will be made intrinsic.


Perhaps i am asking for trouble bringing this up, but do we require acquire/release variants of getAndAdd and getAndSet? (IMHO we could drop addAndGet).


More information about the jmm-dev mailing list