summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_sigmask.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-04-29 09:59:34 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-04-29 09:59:34 +0000
commit4a027d50c7f3f30178a89b3159ba9e4b44f06885 (patch)
treeb7a4ea836e97e11d436f9a6657ea6a9ec8036c33 /lib/libpthread/thread/thr_sigmask.c
parentccf47cfcedf9f3db1780bc3b52ca0adb4480d3f6 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sigmask.c')
-rw-r--r--lib/libpthread/thread/thr_sigmask.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/libpthread/thread/thr_sigmask.c b/lib/libpthread/thread/thr_sigmask.c
index 94f64cb7991f..23d6b7ff2a3e 100644
--- a/lib/libpthread/thread/thr_sigmask.c
+++ b/lib/libpthread/thread/thr_sigmask.c
@@ -39,8 +39,7 @@
int
pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
{
- int ret = 0;
- int status;
+ int ret = 0;
/* Check if the existing signal process mask is to be returned: */
if (oset != NULL) {
@@ -49,9 +48,6 @@ pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
}
/* Check if a new signal set was provided by the caller: */
if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
/* Process according to what to do: */
switch (how) {
/* Block signals: */
@@ -81,11 +77,12 @@ pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
}
/*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
+ * Dispatch signals to the running thread that are pending
+ * and now unblocked:
*/
- _thread_kern_sched(NULL);
+ _dispatch_signals();
}
+
/* Return the completion status: */
return (ret);
}