runtime: Use pthread_sigmask instead of sigprocmask.

From-SVN: r205652
This commit is contained in:
Ian Lance Taylor 2013-12-04 01:35:53 +00:00
parent 4924840463
commit 50312b2ff0
3 changed files with 4 additions and 4 deletions

View 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);
}

View 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");

View 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.