src/hotspot/share/gc/z/zMarkTerminate.inline.hpp
changeset 59252 623722a6aeb9
parent 59250 a6deb69743d4
child 59290 97d13893ec3c
--- a/src/hotspot/share/gc/z/zMarkTerminate.inline.hpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zMarkTerminate.inline.hpp	Mon Nov 25 12:33:15 2019 +0100
@@ -49,7 +49,7 @@
     }
 
     const uint new_nworking = nworking + 1;
-    const uint prev_nworking = Atomic::cmpxchg(new_nworking, nworking_stage, nworking);
+    const uint prev_nworking = Atomic::cmpxchg(nworking_stage, nworking, new_nworking);
     if (prev_nworking == nworking) {
       // Success
       return true;