]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: Use pthread_sigmask instead of sigprocmask.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 4 Dec 2013 01:35:53 +0000 (01:35 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 4 Dec 2013 01:35:53 +0000 (01:35 +0000)
From-SVN: r205652

libgo/runtime/go-signal.c
libgo/runtime/proc.c
libgo/runtime/runtime.c

index 73bd8371b8f7a7a8abd92b1b0418907042ac4a09..1624122dace8c193a697c33b6a08ecb07f4cd1aa 100644 (file)
@@ -252,7 +252,7 @@ sig_panic_leadin (int sig)
   /* The signal handler blocked signals; unblock them.  */
   i = sigfillset (&clear);
   __go_assert (i == 0);
-  i = sigprocmask (SIG_UNBLOCK, &clear, NULL);
+  i = pthread_sigmask (SIG_UNBLOCK, &clear, NULL);
   __go_assert (i == 0);
 }
 
index 47a472b6d0a3a6e11b58d5e3e2c652f9f92a418d..19afee3cd7ae07a93c5b965b3b218b6a136d319f 100644 (file)
@@ -208,9 +208,9 @@ runtime_newosproc(M *mp)
 #endif
 
        sigemptyset(&old);
-       sigprocmask(SIG_BLOCK, &clear, &old);
+       pthread_sigmask(SIG_BLOCK, &clear, &old);
        ret = pthread_create(&tid, &attr, runtime_mstart, mp);
-       sigprocmask(SIG_SETMASK, &old, nil);
+       pthread_sigmask(SIG_SETMASK, &old, nil);
 
        if (ret != 0)
                runtime_throw("pthread_create");
index 56fc045eac8ecd937335fdf43d937ac640794162..8fbc916fcfab4ced7c03b569004c84212ce4ab64 100644 (file)
@@ -256,7 +256,7 @@ runtime_minit(void)
        runtime_signalstack(m->gsignalstack, m->gsignalstacksize);
        if (sigemptyset(&sigs) != 0)
                runtime_throw("sigemptyset");
-       sigprocmask(SIG_SETMASK, &sigs, nil);
+       pthread_sigmask(SIG_SETMASK, &sigs, nil);
 }
 
 // Called from dropm to undo the effect of an minit.