< prev index next >

src/hotspot/os/solaris/os_solaris.cpp

Print this page

        

*** 1869,1878 **** --- 1869,1880 ---- jio_snprintf(buf, buflen, PTR_FORMAT, handler); } return buf; } + void signalHandler(int sig, siginfo_t* info, void* ucVoid); + static void print_signal_handler(outputStream* st, int sig, char* buf, size_t buflen) { struct sigaction sa; sigaction(sig, NULL, &sa);
*** 2128,2148 **** } ourSigFlags = (int*)malloc(sizeof(int) * (Maxsignum + 1), mtInternal); memset(ourSigFlags, 0, sizeof(int) * (Maxsignum + 1)); } ! void os::signal_init_pd() { // Initialize signal semaphore sig_sem = new Semaphore(); } 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"); } } --- 2130,2150 ---- } ourSigFlags = (int*)malloc(sizeof(int) * (Maxsignum + 1), mtInternal); memset(ourSigFlags, 0, sizeof(int) * (Maxsignum + 1)); } ! static void jdk_misc_signal_init() { // Initialize signal semaphore sig_sem = new Semaphore(); } 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"); } }
*** 3681,3691 **** siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized); ! void signalHandler(int sig, siginfo_t* info, void* ucVoid) { int orig_errno = errno; // Preserve errno value over signal handler. JVM_handle_solaris_signal(sig, info, ucVoid, true); errno = orig_errno; } --- 3683,3693 ---- siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized); ! static void signalHandler(int sig, siginfo_t* info, void* ucVoid) { int orig_errno = errno; // Preserve errno value over signal handler. JVM_handle_solaris_signal(sig, info, ucVoid, true); errno = orig_errno; }
*** 4247,4256 **** --- 4249,4262 ---- } Solaris::signal_sets_init(); Solaris::init_signal_mem(); Solaris::install_signal_handlers(); + // Initialize data for jdk.internal.misc.Signal + if (!ReduceSignalUsage) { + jdk_misc_signal_init(); + } // initialize synchronization primitives to use either thread or // lwp synchronization (controlled by UseLWPSynchronization) Solaris::synchronization_init();
< prev index next >