summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_sigmask.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_sigmask.c')
-rw-r--r--lib/libc_r/uthread/uthread_sigmask.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/libc_r/uthread/uthread_sigmask.c b/lib/libc_r/uthread/uthread_sigmask.c
index 94f64cb..23d6b7f 100644
--- a/lib/libc_r/uthread/uthread_sigmask.c
+++ b/lib/libc_r/uthread/uthread_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);
}
OpenPOWER on IntegriCloud