--- old/src/hotspot/os/solaris/os_solaris.cpp 2019-11-21 11:54:03.575826239 +0100 +++ new/src/hotspot/os/solaris/os_solaris.cpp 2019-11-21 11:54:03.319821909 +0100 @@ -4797,7 +4797,7 @@ // from the first park() call after an unpark() call which will help // shake out uses of park() and unpark() without condition variables. - if (Atomic::xchg(1, &_Event) >= 0) return; + if (Atomic::xchg(&_Event, 1) >= 0) return; // If the thread associated with the event was parked, wake it. // Wait for the thread assoc with the PlatformEvent to vacate. @@ -4896,7 +4896,7 @@ // Return immediately if a permit is available. // We depend on Atomic::xchg() having full barrier semantics // since we are doing a lock-free update to _counter. - if (Atomic::xchg(0, &_counter) > 0) return; + if (Atomic::xchg(&_counter, 0) > 0) return; // Optional fast-exit: Check interrupt before trying to wait Thread* thread = Thread::current();