< prev index next >

src/hotspot/share/runtime/safepoint.cpp

Print this page

        

@@ -803,13 +803,13 @@
       // Load dependent store, it must not pass loading of safepoint_id.
       thread->safepoint_state()->set_safepoint_id(safepoint_id); // Release store
 
       // This part we can skip if we notice we miss or are in a future safepoint.
       OrderAccess::storestore();
-      // Load in wait barrier should not float up
-      thread->set_thread_state_fence(_thread_blocked);
+      thread->set_thread_state(_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");
 
       // If barrier is disarmed stop store from floating above loads in barrier.
       OrderAccess::loadstore();
< prev index next >