src/hotspot/share/utilities/singleWriterSynchronizer.cpp
changeset 59249 29b0d0b61615
parent 59247 56bf71d64d51
child 59252 623722a6aeb9
--- a/src/hotspot/share/utilities/singleWriterSynchronizer.cpp	Mon Nov 25 12:30:24 2019 +0100
+++ b/src/hotspot/share/utilities/singleWriterSynchronizer.cpp	Mon Nov 25 12:31:39 2019 +0100
@@ -44,7 +44,7 @@
 // synchronization have exited that critical section.
 void SingleWriterSynchronizer::synchronize() {
   // Side-effect in assert balanced by debug-only dec at end.
-  assert(Atomic::add(1u, &_writers) == 1u, "multiple writers");
+  assert(Atomic::add(&_writers, 1u) == 1u, "multiple writers");
   // We don't know anything about the muxing between this invocation
   // and invocations in other threads.  We must start with the latest
   // _enter polarity, else we could clobber the wrong _exit value on