diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2000-10-13 22:12:32 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2000-10-13 22:12:32 +0000 |
| commit | fbeb36e4bf72161883eda56a41578de1d8f2f885 (patch) | |
| tree | 06c51ea3d094e4b4c0492667aa46cf83d9e938c6 /lib/libpthread/thread/thr_sigmask.c | |
| parent | a95b77ec78e646b4b781d4b498bc3be7ddaee44c (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sigmask.c')
| -rw-r--r-- | lib/libpthread/thread/thr_sigmask.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_sigmask.c b/lib/libpthread/thread/thr_sigmask.c index b880d9c748c8..bdb0b438ec48 100644 --- a/lib/libpthread/thread/thr_sigmask.c +++ b/lib/libpthread/thread/thr_sigmask.c @@ -43,7 +43,8 @@ int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { - int ret = 0; + sigset_t sigset; + int ret = 0; /* Check if the existing signal process mask is to be returned: */ if (oset != NULL) { @@ -81,10 +82,18 @@ pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) } /* - * Dispatch signals to the running thread that are pending - * and now unblocked: + * Check if there are pending signals for the running + * thread or process that aren't blocked: */ - _dispatch_signals(); + sigset = _thread_run->sigpend; + SIGSETOR(sigset, _process_sigpending); + SIGSETNAND(sigset, _thread_run->sigmask); + if (SIGNOTEMPTY(sigset)) + /* + * Call the kernel scheduler which will safely + * install a signal frame for the running thread: + */ + _thread_kern_sched_sig(); } /* Return the completion status: */ |
