diff options
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_sigprocmask.c | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/lib/libpthread/uthread/uthread_sigprocmask.c b/lib/libpthread/uthread/uthread_sigprocmask.c index 28d4c3b1efe..ebe56d899b6 100644 --- a/lib/libpthread/uthread/uthread_sigprocmask.c +++ b/lib/libpthread/uthread/uthread_sigprocmask.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_sigprocmask.c,v 1.3 1999/11/25 07:01:45 d Exp $ */ +/* $OpenBSD: uthread_sigprocmask.c,v 1.4 2001/12/30 01:11:07 fgsch Exp $ */ /* * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -39,52 +39,8 @@ #include "pthread_private.h" int -sigprocmask(int how, const sigset_t * set, sigset_t * oset) +sigprocmask(int how, const sigset_t *set, sigset_t *oset) { - int ret = 0; - - /* Check if the existing signal process mask is to be returned: */ - if (oset != NULL) { - /* Return the current mask: */ - *oset = _thread_run->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: */ - _thread_run->sigmask |= *set; - break; - - /* Unblock signals: */ - case SIG_UNBLOCK: - /* Clear signals from the existing mask: */ - _thread_run->sigmask &= ~(*set); - break; - - /* Set the signal process mask: */ - case SIG_SETMASK: - /* Set the new mask: */ - _thread_run->sigmask = *set; - break; - - /* Trap invalid actions: */ - default: - /* Return an invalid argument: */ - errno = EINVAL; - ret = -1; - break; - } - - /* - * Dispatch signals to the running thread that are pending - * and now unblocked: - */ - _dispatch_signals(); - } - /* Return the completion status: */ - return (ret); + return (pthread_sigmask(how, set, oset)); } #endif |