< prev index next >

src/hotspot/cpu/zero/cppInterpreter_zero.cpp

Print this page

        

@@ -369,16 +369,18 @@
 
   // Make the call
   intptr_t result[4 - LogBytesPerWord];
   ffi_call(handler->cif(), (void (*)()) function, result, arguments);
 
-  // Change the thread state back to _thread_in_Java and ensure it
-  // is seen by the GC thread.
+  // Change the thread state back to _thread_in_Java.
   // ThreadStateTransition::transition_from_native() cannot be used
   // here because it does not check for asynchronous exceptions.
   // We have to manage the transition ourself.
-  thread->set_thread_state_fence(_thread_in_native_trans);
+  thread->set_thread_state(_thread_in_native_trans);
+
+  // Make sure new state is visible in the GC thread
+  InterfaceSupport::serialize_thread_state(thread);
 
   // Handle safepoint operations, pending suspend requests,
   // and pending asynchronous exceptions.
   if (SafepointMechanism::should_block(thread) ||
       thread->has_special_condition_for_native_trans()) {

@@ -697,15 +699,15 @@
   int argument_slots = java_lang_invoke_MethodType::ptype_slot_count(method_type);
 
   return stack->sp() + argument_slots;
 }
 
-JRT_ENTRY(void, CppInterpreter::throw_exception(JavaThread* thread,
+IRT_ENTRY(void, CppInterpreter::throw_exception(JavaThread* thread,
                                                 Symbol*     name,
                                                 char*       message))
   THROW_MSG(name, message);
-JRT_END
+IRT_END
 
 InterpreterFrame *InterpreterFrame::build(Method* const method, TRAPS) {
   JavaThread *thread = (JavaThread *) THREAD;
   ZeroStack *stack = thread->zero_stack();
 
< prev index next >