src/hotspot/share/runtime/safepoint.cpp
changeset 54495 941db9c0b5b5
parent 54323 846bc643f4ef
child 54621 0b6dc5b93306
--- a/src/hotspot/share/runtime/safepoint.cpp	Wed Apr 10 21:21:31 2019 +0000
+++ b/src/hotspot/share/runtime/safepoint.cpp	Wed Apr 10 17:31:31 2019 -0400
@@ -805,9 +805,9 @@
 
       // This part we can skip if we notice we miss or are in a future safepoint.
       OrderAccess::storestore();
-      thread->set_thread_state(_thread_blocked);
+      // Load in wait barrier should not float up
+      thread->set_thread_state_fence(_thread_blocked);
 
-      OrderAccess::fence(); // Load in wait barrier should not float up
       _wait_barrier->wait(static_cast<int>(safepoint_id));
       assert(_state != _synchronized, "Can't be");