src/hotspot/share/runtime/synchronizer.cpp
changeset 59251 4cbfa5077d68
parent 59247 56bf71d64d51
child 59252 623722a6aeb9
--- a/src/hotspot/share/runtime/synchronizer.cpp	Mon Nov 25 12:32:07 2019 +0100
+++ b/src/hotspot/share/runtime/synchronizer.cpp	Mon Nov 25 12:32:40 2019 +0100
@@ -998,7 +998,7 @@
   // of active monitors passes the specified threshold.
   // TODO: assert thread state is reasonable
 
-  if (ForceMonitorScavenge == 0 && Atomic::xchg (1, &ForceMonitorScavenge) == 0) {
+  if (ForceMonitorScavenge == 0 && Atomic::xchg(&ForceMonitorScavenge, 1) == 0) {
     // Induce a 'null' safepoint to scavenge monitors
     // Must VM_Operation instance be heap allocated as the op will be enqueue and posted
     // to the VMthread and have a lifespan longer than that of this activation record.