diff -r 4cbfa5077d68 -r 623722a6aeb9 src/hotspot/os/posix/os_posix.cpp --- a/src/hotspot/os/posix/os_posix.cpp Mon Nov 25 12:32:40 2019 +0100 +++ b/src/hotspot/os/posix/os_posix.cpp Mon Nov 25 12:33:15 2019 +0100 @@ -1900,7 +1900,7 @@ // atomically decrement _event for (;;) { v = _event; - if (Atomic::cmpxchg(v - 1, &_event, v) == v) break; + if (Atomic::cmpxchg(&_event, v, v - 1) == v) break; } guarantee(v >= 0, "invariant"); @@ -1940,7 +1940,7 @@ // atomically decrement _event for (;;) { v = _event; - if (Atomic::cmpxchg(v - 1, &_event, v) == v) break; + if (Atomic::cmpxchg(&_event, v, v - 1) == v) break; } guarantee(v >= 0, "invariant");