< prev index next >
src/hotspot/share/runtime/thread.cpp
Print this page
rev 54327 : 8221477: Inject os/cpu-specific constants into Unsafe from JVM
Summary: Initialize Unsafe os/cpu-specific constants using injection instead of native callouts
Reviewed-by: stuefe
*** 3620,3629 ****
--- 3620,3634 ----
Handle thread_group = create_initial_thread_group(CHECK);
Universe::set_main_thread_group(thread_group());
initialize_class(vmSymbols::java_lang_Thread(), CHECK);
oop thread_object = create_initial_thread(thread_group, main_thread, CHECK);
main_thread->set_threadObj(thread_object);
+
+ // initialize the hardware-specific constants needed by Unsafe
+ initialize_class(vmSymbols::jdk_internal_misc_UnsafeConstants(), CHECK);
+ jdk_internal_misc_UnsafeConstants::set_unsafe_constants();
+
// Set thread status to running since main thread has
// been started and running.
java_lang_Thread::set_thread_status(thread_object,
java_lang_Thread::RUNNABLE);
< prev index next >