--- a/src/hotspot/share/gc/shared/parallelCleaning.cpp Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/gc/shared/parallelCleaning.cpp Mon Nov 25 12:33:15 2019 +0100
@@ -94,7 +94,7 @@
}
}
- } while (Atomic::cmpxchg(last.method(), &_claimed_nmethod, first) != first);
+ } while (Atomic::cmpxchg(&_claimed_nmethod, first, last.method()) != first);
}
void CodeCacheUnloadingTask::work(uint worker_id) {
@@ -130,7 +130,7 @@
return false;
}
- return Atomic::cmpxchg(1, &_clean_klass_tree_claimed, 0) == 0;
+ return Atomic::cmpxchg(&_clean_klass_tree_claimed, 0, 1) == 0;
}
InstanceKlass* KlassCleaningTask::claim_next_klass() {