diff options
author | Roland McGrath <roland@gnu.org> | 2002-01-02 10:52:56 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-01-02 10:52:56 +0000 |
commit | 05dea6d10c72d7604d289eca4d39dadeda7e88ac (patch) | |
tree | d8ec85083fef50360592c88b5238527e66da9661 /sysdeps/mach/hurd/sigwait.c | |
parent | 2fee5d8b20b1004e117a89ce63df2427fcabc342 (diff) | |
download | glibc-05dea6d10c72d7604d289eca4d39dadeda7e88ac.tar.gz glibc-05dea6d10c72d7604d289eca4d39dadeda7e88ac.tar.xz glibc-05dea6d10c72d7604d289eca4d39dadeda7e88ac.zip |
* sysdeps/mach/hurd/sigwait.c (__sigwait): Use __sigandset,
__sigisemptyset. Don't use MASK uninitialized. * sysdeps/mach/hurd/sigprocmask.c (__sigprocmask): Use __sigorset. * hurd/hurdinit.c (_hurd_new_proc_init): Use __sigisemptyset. * hurd/hurdsig.c (_hurd_internal_post_signal): Use __sigismember, __sigdelset, __sigaddset, __sigorset.
Diffstat (limited to 'sysdeps/mach/hurd/sigwait.c')
-rw-r--r-- | sysdeps/mach/hurd/sigwait.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/sigwait.c b/sysdeps/mach/hurd/sigwait.c index 9ddb89980c..9794076be6 100644 --- a/sysdeps/mach/hurd/sigwait.c +++ b/sysdeps/mach/hurd/sigwait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,97,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,97,2001,02 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -68,13 +68,15 @@ __sigwait (const sigset_t *set, int *sig) if (set != NULL) /* Crash before locking */ mask = *set; + else + __sigemptyset (&mask); ss = _hurd_self_sigstate (); __spin_lock (&ss->lock); /* See if one of these signals is currently pending. */ - ready = ss->pending & mask; - if (ready) + __sigandset (&ready, &ss->pending, &mask); + if (! __sigisemptyset (&ready)) { for (signo = 1; signo < NSIG; signo++) if (__sigismember (&ready, signo)) |