mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-28 14:24:43 +08:00
runtime: Use pthread_sigmask instead of sigprocmask.
From-SVN: r205652
This commit is contained in:
parent
4924840463
commit
50312b2ff0
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user