< prev index next >

src/hotspot/os/solaris/os_solaris.cpp

Print this page

        

@@ -1869,10 +1869,12 @@
     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,21 +2130,21 @@
   }
   ourSigFlags = (int*)malloc(sizeof(int) * (Maxsignum + 1), mtInternal);
   memset(ourSigFlags, 0, sizeof(int) * (Maxsignum + 1));
 }
 
-void os::signal_init_pd() {
+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 signal_init_pd
+    // Signal thread is not created with ReduceSignalUsage and jdk_misc_signal_init
     // initialization isn't called.
     assert(ReduceSignalUsage, "signal semaphore should be created");
   }
 }
 

@@ -3681,11 +3683,11 @@
                                                    siginfo_t* siginfo,
                                                    void* ucontext,
                                                    int abort_if_unrecognized);
 
 
-void signalHandler(int sig, siginfo_t* info, void* ucVoid) {
+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,10 +4249,14 @@
   }
 
   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 >