src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp
changeset 59252 623722a6aeb9
parent 54798 9c18785a13bf
--- a/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp	Mon Nov 25 12:33:15 2019 +0100
@@ -146,7 +146,7 @@
 
   while(index < num_regions) {
     if (is_in(index)) {
-      jint cur = Atomic::cmpxchg((jint)(index + 1), &_current_index, saved_current);
+      jint cur = Atomic::cmpxchg(&_current_index, saved_current, (jint)(index + 1));
       assert(cur >= (jint)saved_current, "Must move forward");
       if (cur == saved_current) {
         assert(is_in(index), "Invariant");