--- old/src/hotspot/os/aix/os_aix.cpp 2019-11-21 11:54:44.372516227 +0100 +++ new/src/hotspot/os/aix/os_aix.cpp 2019-11-21 11:54:44.116511898 +0100 @@ -1084,7 +1084,7 @@ if (now <= prev) { return prev; // same or retrograde time; } - jlong obsv = Atomic::cmpxchg(now, &max_real_time, prev); + jlong obsv = Atomic::cmpxchg(&max_real_time, prev, now); assert(obsv >= prev, "invariant"); // Monotonicity // If the CAS succeeded then we're done and return "now". // If the CAS failed and the observed value "obsv" is >= now then @@ -1794,7 +1794,7 @@ for (;;) { for (int i = 0; i < NSIG + 1; i++) { jint n = pending_signals[i]; - if (n > 0 && n == Atomic::cmpxchg(n - 1, &pending_signals[i], n)) { + if (n > 0 && n == Atomic::cmpxchg(&pending_signals[i], n, n - 1)) { return i; } }