mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8269652: Factor out the common code for creating system j.l.Thread objects
Reviewed-by: coleenp, dcubed, kvn, xliu
This commit is contained in:
parent
17f53f2f9c
commit
390d1025ca
8 changed files with 53 additions and 97 deletions
|
@ -469,26 +469,8 @@ void os::init_before_ergo() {
|
|||
void os::initialize_jdk_signal_support(TRAPS) {
|
||||
if (!ReduceSignalUsage) {
|
||||
// Setup JavaThread for processing signals
|
||||
const char thread_name[] = "Signal Dispatcher";
|
||||
Handle string = java_lang_String::create_from_str(thread_name, CHECK);
|
||||
|
||||
// Initialize thread_oop to put it into the system threadGroup
|
||||
Handle thread_group (THREAD, Universe::system_thread_group());
|
||||
Handle thread_oop = JavaCalls::construct_new_instance(vmClasses::Thread_klass(),
|
||||
vmSymbols::threadgroup_string_void_signature(),
|
||||
thread_group,
|
||||
string,
|
||||
CHECK);
|
||||
|
||||
Klass* group = vmClasses::ThreadGroup_klass();
|
||||
JavaValue result(T_VOID);
|
||||
JavaCalls::call_special(&result,
|
||||
thread_group,
|
||||
group,
|
||||
vmSymbols::add_method_name(),
|
||||
vmSymbols::thread_void_signature(),
|
||||
thread_oop,
|
||||
CHECK);
|
||||
const char* name = "Signal Dispatcher";
|
||||
Handle thread_oop = JavaThread::create_system_thread_object(name, true /* visible */, CHECK);
|
||||
|
||||
JavaThread* thread = new JavaThread(&signal_thread_entry);
|
||||
JavaThread::vm_exit_on_osthread_failure(thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue