Commit 50312b2f by Ian Lance Taylor

runtime: Use pthread_sigmask instead of sigprocmask.

From-SVN: r205652
parent 49248404
...@@ -252,7 +252,7 @@ sig_panic_leadin (int sig) ...@@ -252,7 +252,7 @@ sig_panic_leadin (int sig)
/* The signal handler blocked signals; unblock them. */ /* The signal handler blocked signals; unblock them. */
i = sigfillset (&clear); i = sigfillset (&clear);
__go_assert (i == 0); __go_assert (i == 0);
i = sigprocmask (SIG_UNBLOCK, &clear, NULL); i = pthread_sigmask (SIG_UNBLOCK, &clear, NULL);
__go_assert (i == 0); __go_assert (i == 0);
} }
......
...@@ -208,9 +208,9 @@ runtime_newosproc(M *mp) ...@@ -208,9 +208,9 @@ runtime_newosproc(M *mp)
#endif #endif
sigemptyset(&old); sigemptyset(&old);
sigprocmask(SIG_BLOCK, &clear, &old); pthread_sigmask(SIG_BLOCK, &clear, &old);
ret = pthread_create(&tid, &attr, runtime_mstart, mp); ret = pthread_create(&tid, &attr, runtime_mstart, mp);
sigprocmask(SIG_SETMASK, &old, nil); pthread_sigmask(SIG_SETMASK, &old, nil);
if (ret != 0) if (ret != 0)
runtime_throw("pthread_create"); runtime_throw("pthread_create");
......
...@@ -256,7 +256,7 @@ runtime_minit(void) ...@@ -256,7 +256,7 @@ runtime_minit(void)
runtime_signalstack(m->gsignalstack, m->gsignalstacksize); runtime_signalstack(m->gsignalstack, m->gsignalstacksize);
if (sigemptyset(&sigs) != 0) if (sigemptyset(&sigs) != 0)
runtime_throw("sigemptyset"); runtime_throw("sigemptyset");
sigprocmask(SIG_SETMASK, &sigs, nil); pthread_sigmask(SIG_SETMASK, &sigs, nil);
} }
// Called from dropm to undo the effect of an minit. // Called from dropm to undo the effect of an minit.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment