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

Unsafe.{get|set}Opaque should be single copy atomic

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • None
    • hotspot
    • None
    • b120

      Current C2 intrinsic code makes Opaque a "relaxed" plain load/store with regards to single copy atomicity.

        bool requires_atomic_access = false;
        switch (kind) {
            case Relaxed:
            case Opaque:
                requires_atomic_access = AlwaysAtomicAccesses;
                break;

      This contradicts the intent of making Opaque similar to std::atomic...(..., memory_order_relaxed), which is single copy atomic.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: