< prev index next >

src/hotspot/share/runtime/interfaceSupport.hpp

Print this page
rev 47413 : Introduce SafepointMechanism

@@ -28,11 +28,11 @@
 #include "gc/shared/gcLocker.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "runtime/safepoint.hpp"
+#include "runtime/safepointMechanism.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/preserveException.hpp"

@@ -140,13 +140,11 @@
     // Change to transition state
     thread->set_thread_state((JavaThreadState)(from + 1));
 
     InterfaceSupport::serialize_thread_state(thread);
 
-    if (SafepointSynchronize::do_call_back()) {
-      SafepointSynchronize::block(thread);
-    }
+    SafepointMechanism::block_if_requested(thread);
     thread->set_thread_state(to);
 
     CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
   }
 

@@ -162,13 +160,11 @@
     // Change to transition state
     thread->set_thread_state((JavaThreadState)(from + 1));
 
     InterfaceSupport::serialize_thread_state_with_handler(thread);
 
-    if (SafepointSynchronize::do_call_back()) {
-      SafepointSynchronize::block(thread);
-    }
+    SafepointMechanism::block_if_requested(thread);
     thread->set_thread_state(to);
 
     CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
   }
 

@@ -189,11 +185,11 @@
     InterfaceSupport::serialize_thread_state_with_handler(thread);
 
     // We never install asynchronous exceptions when coming (back) in
     // to the runtime from native code because the runtime is not set
     // up to handle exceptions floating around at arbitrary points.
-    if (SafepointSynchronize::do_call_back() || thread->is_suspend_after_native()) {
+    if (SafepointMechanism::poll() || thread->is_suspend_after_native()) {
       JavaThread::check_safepoint_and_suspend_for_native_trans(thread);
 
       // Clear unhandled oops anywhere where we could block, even if we don't.
       CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
     }
< prev index next >