< prev index next >

src/hotspot/os/linux/os_linux.cpp

Print this page

        

@@ -2530,11 +2530,11 @@
 
 // Linux(POSIX) specific hand shaking semaphore.
 static Semaphore* sig_sem = NULL;
 static PosixSemaphore sr_semaphore;
 
-void os::signal_init_pd() {
+static void jdk_misc_signal_init() {
   // Initialize signal structures
   ::memset((void*)pending_signals, 0, sizeof(pending_signals));
 
   // Initialize signal semaphore
   sig_sem = new Semaphore();

@@ -2543,11 +2543,11 @@
 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");
   }
 }
 

@@ -4450,11 +4450,11 @@
 extern "C" JNIEXPORT int JVM_handle_linux_signal(int signo,
                                                  siginfo_t* siginfo,
                                                  void* ucontext,
                                                  int abort_if_unrecognized);
 
-void signalHandler(int sig, siginfo_t* info, void* uc) {
+static void signalHandler(int sig, siginfo_t* info, void* uc) {
   assert(info != NULL && uc != NULL, "it must be old kernel");
   int orig_errno = errno;  // Preserve errno value over signal handler.
   JVM_handle_linux_signal(sig, info, uc, true);
   errno = orig_errno;
 }

@@ -4998,10 +4998,14 @@
     return JNI_ERR;
   }
 
   Linux::signal_sets_init();
   Linux::install_signal_handlers();
+  // Initialize data for jdk.internal.misc.Signal
+  if (!ReduceSignalUsage) {
+    jdk_misc_signal_init();
+  }
 
   // Check and sets minimum stack sizes against command line options
   if (Posix::set_minimum_stack_sizes() == JNI_ERR) {
     return JNI_ERR;
   }
< prev index next >