< prev index next >

src/share/vm/runtime/thread.cpp

Print this page
rev 13142 : 8183198: Factor out thread state serialization into a proper helper function
Reviewed-by:

@@ -2395,20 +2395,12 @@
     // after restoring the state and make sure we won't leave while a safepoint
     // is in progress.
     thread->set_thread_state(_thread_blocked);
     thread->java_suspend_self();
     thread->set_thread_state(state);
-    // Make sure new state is seen by VM thread
-    if (os::is_MP()) {
-      if (UseMembar) {
-        // Force a fence between the write above and read below
-        OrderAccess::fence();
-      } else {
-        // Must use this rather than serialization page in particular on Windows
-        InterfaceSupport::serialize_memory(thread);
-      }
-    }
+
+    InterfaceSupport::serialize_thread_state_with_handler(thread);
   }
 
   if (SafepointSynchronize::do_call_back()) {
     // If we are safepointing, then block the caller which may not be
     // the same as the target thread (see above).
< prev index next >