Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8080588 VarHandles development
  3. JDK-8154755

Add a VarHandle weakCompareAndSet with volatile semantics

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Description

      VarHandle has a weakCompareAndSet method with "plain" semantics.

      A compareAndSet cannot reliably be replaced with a weak variant on platforms that support LL/SC. See here for more details:

      http://mail.openjdk.java.net/pipermail/jmm-dev/2016-April/000239.html

      A variant with "volatile" semantics should be added e.g. weakCompareAndSetVolatile.

      JDK change:
       http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8154755-weak-cas-volatile/webrev/

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psandoz Paul Sandoz
                Reporter:
                psandoz Paul Sandoz
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: