src/hotspot/share/utilities/singleWriterSynchronizer.cpp
changeset 59252 623722a6aeb9
parent 59249 29b0d0b61615
--- a/src/hotspot/share/utilities/singleWriterSynchronizer.cpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/utilities/singleWriterSynchronizer.cpp	Mon Nov 25 12:33:15 2019 +0100
@@ -64,7 +64,7 @@
   do {
     old = value;
     *new_ptr = ++value;
-    value = Atomic::cmpxchg(value, &_enter, old);
+    value = Atomic::cmpxchg(&_enter, old, value);
   } while (old != value);
   // Critical sections entered before we changed the polarity will use
   // the old exit counter.  Critical sections entered after the change