< prev index next >

src/hotspot/os/windows/os_windows.cpp

Print this page

        

*** 1991,2001 **** // a counter for each possible signal value, including signal_thread exit signal static volatile jint pending_signals[NSIG+1] = { 0 }; static Semaphore* sig_sem = NULL; ! void os::signal_init_pd() { // Initialize signal structures memset((void*)pending_signals, 0, sizeof(pending_signals)); // Initialize signal semaphore sig_sem = new Semaphore(); --- 1991,2001 ---- // a counter for each possible signal value, including signal_thread exit signal static volatile jint pending_signals[NSIG+1] = { 0 }; static Semaphore* sig_sem = NULL; ! static void jdk_misc_signal_init() { // Initialize signal structures memset((void*)pending_signals, 0, sizeof(pending_signals)); // Initialize signal semaphore sig_sem = new Semaphore();
*** 2012,2033 **** // completely disable the VM's usage of these console events if -Xrs // (=ReduceSignalUsage) is specified. This means, for example, that // the CTRL-BREAK thread dump mechanism is also disabled in this // case. See bugs 4323062, 4345157, and related bugs. - if (!ReduceSignalUsage) { // Add a CTRL-C handler SetConsoleCtrlHandler(consoleHandler, TRUE); - } } void os::signal_notify(int sig) { if (sig_sem != NULL) { Atomic::inc(&pending_signals[sig]); sig_sem->signal(); } else { ! // Signal thread is not created with ReduceSignalUsage and signal_init_pd // initialization isn't called. assert(ReduceSignalUsage, "signal semaphore should be created"); } } --- 2012,2031 ---- // completely disable the VM's usage of these console events if -Xrs // (=ReduceSignalUsage) is specified. This means, for example, that // the CTRL-BREAK thread dump mechanism is also disabled in this // case. See bugs 4323062, 4345157, and related bugs. // Add a CTRL-C handler SetConsoleCtrlHandler(consoleHandler, TRUE); } void os::signal_notify(int sig) { if (sig_sem != NULL) { Atomic::inc(&pending_signals[sig]); sig_sem->signal(); } else { ! // Signal thread is not created with ReduceSignalUsage and jdk_misc_signal_init // initialization isn't called. assert(ReduceSignalUsage, "signal semaphore should be created"); } }
*** 4130,4139 **** --- 4128,4142 ---- return JNI_ERR; } SymbolEngine::recalc_search_path(); + // Initialize data for jdk.internal.misc.Signal + if (!ReduceSignalUsage) { + jdk_misc_signal_init(); + } + return JNI_OK; } // Mark the polling page as unreadable void os::make_polling_page_unreadable(void) {
< prev index next >