8143558: evaluate if thr_sigsetmask can be removed from hotspot (solaris) codebase
authorsebastian
Thu, 14 Jan 2016 22:52:54 -0500
changeset 35501 e0450beb58bf
parent 35497 94c7c07d0161
child 35502 d04a2b4b4f44
8143558: evaluate if thr_sigsetmask can be removed from hotspot (solaris) codebase Reviewed-by: dholmes
hotspot/src/os/solaris/vm/os_solaris.cpp
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Jan 14 15:45:31 2016 -0500
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Jan 14 22:52:54 2016 -0500
@@ -819,19 +819,19 @@
 void os::Solaris::hotspot_sigmask(Thread* thread) {
   //Save caller's signal mask
   sigset_t sigmask;
-  thr_sigsetmask(SIG_SETMASK, NULL, &sigmask);
+  pthread_sigmask(SIG_SETMASK, NULL, &sigmask);
   OSThread *osthread = thread->osthread();
   osthread->set_caller_sigmask(sigmask);
 
-  thr_sigsetmask(SIG_UNBLOCK, os::Solaris::unblocked_signals(), NULL);
+  pthread_sigmask(SIG_UNBLOCK, os::Solaris::unblocked_signals(), NULL);
   if (!ReduceSignalUsage) {
     if (thread->is_VM_thread()) {
       // Only the VM thread handles BREAK_SIGNAL ...
-      thr_sigsetmask(SIG_UNBLOCK, vm_signals(), NULL);
+      pthread_sigmask(SIG_UNBLOCK, vm_signals(), NULL);
     } else {
       // ... all other threads block BREAK_SIGNAL
       assert(!sigismember(vm_signals(), SIGINT), "SIGINT should not be blocked");
-      thr_sigsetmask(SIG_BLOCK, vm_signals(), NULL);
+      pthread_sigmask(SIG_BLOCK, vm_signals(), NULL);
     }
   }
 }
@@ -1188,7 +1188,7 @@
   if (Thread::current()->osthread() == osthread) {
     // Restore caller's signal mask
     sigset_t sigmask = osthread->caller_sigmask();
-    thr_sigsetmask(SIG_SETMASK, &sigmask, NULL);
+    pthread_sigmask(SIG_SETMASK, &sigmask, NULL);
   }
   delete osthread;
 }
@@ -3561,7 +3561,7 @@
       sigset_t suspend_set;  // signals for sigsuspend()
 
       // get current set of blocked signals and unblock resume signal
-      thr_sigsetmask(SIG_BLOCK, NULL, &suspend_set);
+      pthread_sigmask(SIG_BLOCK, NULL, &suspend_set);
       sigdelset(&suspend_set, os::Solaris::SIGasync());
 
       sr_semaphore.signal();
@@ -3838,7 +3838,7 @@
 
     // try to honor the signal mask
     sigset_t oset;
-    thr_sigsetmask(SIG_SETMASK, &(actp->sa_mask), &oset);
+    pthread_sigmask(SIG_SETMASK, &(actp->sa_mask), &oset);
 
     // call into the chained handler
     if (siginfo_flag_set) {
@@ -3848,7 +3848,7 @@
     }
 
     // restore the signal mask
-    thr_sigsetmask(SIG_SETMASK, &oset, 0);
+    pthread_sigmask(SIG_SETMASK, &oset, 0);
   }
   // Tell jvm's signal handler the signal is taken care of.
   return true;
@@ -5492,7 +5492,7 @@
   // (This allows a debugger to break into the running thread.)
   sigset_t oldsigs;
   sigset_t* allowdebug_blocked = os::Solaris::allowdebug_blocked_signals();
-  thr_sigsetmask(SIG_BLOCK, allowdebug_blocked, &oldsigs);
+  pthread_sigmask(SIG_BLOCK, allowdebug_blocked, &oldsigs);
 #endif
 
   OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */);
@@ -5519,7 +5519,7 @@
                 status, "cond_timedwait");
 
 #ifdef ASSERT
-  thr_sigsetmask(SIG_SETMASK, &oldsigs, NULL);
+  pthread_sigmask(SIG_SETMASK, &oldsigs, NULL);
 #endif
   _counter = 0;
   status = os::Solaris::mutex_unlock(_mutex);