src/hotspot/share/runtime/objectMonitor.cpp
changeset 47881 0ce0ac68ace7
parent 47634 6a0c42c40cd1
child 48157 7c4d43c26352
--- a/src/hotspot/share/runtime/objectMonitor.cpp	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/hotspot/share/runtime/objectMonitor.cpp	Thu Aug 31 10:00:28 2017 +0200
@@ -35,6 +35,7 @@
 #include "runtime/objectMonitor.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/osThread.hpp"
+#include "runtime/safepointMechanism.inline.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
 #include "services/threadService.hpp"
@@ -1282,7 +1283,7 @@
   OrderAccess::release_store(&_owner, (void*)NULL);
   OrderAccess::fence();                               // ST _owner vs LD in unpark()
 
-  if (SafepointSynchronize::do_call_back()) {
+  if (SafepointMechanism::poll(Self)) {
     TEVENT(unpark before SAFEPOINT);
   }
 
@@ -1936,7 +1937,7 @@
     // This is in keeping with the "no loitering in runtime" rule.
     // We periodically check to see if there's a safepoint pending.
     if ((ctr & 0xFF) == 0) {
-      if (SafepointSynchronize::do_call_back()) {
+      if (SafepointMechanism::poll(Self)) {
         TEVENT(Spin: safepoint);
         goto Abort;           // abrupt spin egress
       }