diff options
author | mini <mini@FreeBSD.org> | 2002-09-16 19:52:52 +0000 |
---|---|---|
committer | mini <mini@FreeBSD.org> | 2002-09-16 19:52:52 +0000 |
commit | 6077cee24228562d15e285d132213eeb718439b7 (patch) | |
tree | 19954471d255ce812e704c80bd079f406bc31378 /lib/libpthread/thread/thr_sigmask.c | |
parent | ed825a4bd02ff20716e59e0da4db93b761df2734 (diff) | |
download | FreeBSD-src-6077cee24228562d15e285d132213eeb718439b7.zip FreeBSD-src-6077cee24228562d15e285d132213eeb718439b7.tar.gz |
Make libpthread KSE aware.
Reviewed by: deischen, julian
Approved by: -arch
Diffstat (limited to 'lib/libpthread/thread/thr_sigmask.c')
-rw-r--r-- | lib/libpthread/thread/thr_sigmask.c | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/lib/libpthread/thread/thr_sigmask.c b/lib/libpthread/thread/thr_sigmask.c index c26fefc..846062a 100644 --- a/lib/libpthread/thread/thr_sigmask.c +++ b/lib/libpthread/thread/thr_sigmask.c @@ -44,63 +44,6 @@ __weak_reference(_pthread_sigmask, pthread_sigmask); int _pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { - struct pthread *curthread = _get_curthread(); - sigset_t sigset; - int ret = 0; - /* Check if the existing signal process mask is to be returned: */ - if (oset != NULL) { - /* Return the current mask: */ - *oset = curthread->sigmask; - } - /* Check if a new signal set was provided by the caller: */ - if (set != NULL) { - /* Process according to what to do: */ - switch (how) { - /* Block signals: */ - case SIG_BLOCK: - /* Add signals to the existing mask: */ - SIGSETOR(curthread->sigmask, *set); - break; - - /* Unblock signals: */ - case SIG_UNBLOCK: - /* Clear signals from the existing mask: */ - SIGSETNAND(curthread->sigmask, *set); - break; - - /* Set the signal process mask: */ - case SIG_SETMASK: - /* Set the new mask: */ - curthread->sigmask = *set; - break; - - /* Trap invalid actions: */ - default: - /* Return an invalid argument: */ - errno = EINVAL; - ret = -1; - break; - } - - /* Increment the sequence number: */ - curthread->sigmask_seqno++; - - /* - * Check if there are pending signals for the running - * thread or process that aren't blocked: - */ - sigset = curthread->sigpend; - SIGSETOR(sigset, _process_sigpending); - SIGSETNAND(sigset, curthread->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: */ - return (ret); + return (sigprocmask(how, set, oset)); } |