changeset 54498:4eefc9f3313c

8222300: Zero build broken after JDK-8222231 Reviewed-by: dholmes
author aoqi
date Wed, 10 Apr 2019 22:41:28 -0400
parents 96230a5ef2ec
children 3ea8b5858874
files src/hotspot/cpu/zero/cppInterpreter_zero.cpp
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/zero/cppInterpreter_zero.cpp	Wed Apr 10 17:29:03 2019 -0700
+++ b/src/hotspot/cpu/zero/cppInterpreter_zero.cpp	Wed Apr 10 22:41:28 2019 -0400
@@ -371,14 +371,12 @@
   intptr_t result[4 - LogBytesPerWord];
   ffi_call(handler->cif(), (void (*)()) function, result, arguments);
 
-  // Change the thread state back to _thread_in_Java.
+  // Change the thread state back to _thread_in_Java and ensure it
+  // is seen by the GC thread.
   // 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(_thread_in_native_trans);
-
-  // Make sure new state is visible in the GC thread
-  InterfaceSupport::serialize_thread_state(thread);
+  thread->set_thread_state_fence(_thread_in_native_trans);
 
   // Handle safepoint operations, pending suspend requests,
   // and pending asynchronous exceptions.