8223572: ~ThreadInVMForHandshake() should call handle_special_runtime_exit_condition()
authorrrich
Wed, 15 May 2019 12:30:02 +0200
changeset 54898 17926213de55
parent 54897 2e5e9d31a6c5
child 54899 e4cff3cf0234
8223572: ~ThreadInVMForHandshake() should call handle_special_runtime_exit_condition() Reviewed-by: dcubed, rehn, dholmes
src/hotspot/share/runtime/interfaceSupport.inline.hpp
--- a/src/hotspot/share/runtime/interfaceSupport.inline.hpp	Thu May 16 13:57:35 2019 +0200
+++ b/src/hotspot/share/runtime/interfaceSupport.inline.hpp	Wed May 15 12:30:02 2019 +0200
@@ -137,6 +137,12 @@
     SafepointMechanism::block_if_requested(_thread);
 
     _thread->set_thread_state(_original_state);
+
+    if (_original_state != _thread_blocked_trans &&  _original_state != _thread_in_vm_trans &&
+        _thread->has_special_runtime_exit_condition()) {
+      _thread->handle_special_runtime_exit_condition(
+          !_thread->is_at_poll_safepoint() && (_original_state != _thread_in_native_trans));
+    }
   }
 
  public: