From 05dea6d10c72d7604d289eca4d39dadeda7e88ac Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 2 Jan 2002 10:52:56 +0000 Subject: * 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. --- sysdeps/mach/hurd/sigprocmask.c | 4 ++-- sysdeps/mach/hurd/sigwait.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'sysdeps/mach/hurd') diff --git a/sysdeps/mach/hurd/sigprocmask.c b/sysdeps/mach/hurd/sigprocmask.c index f65dbd5e17..cbb5ecce2e 100644 --- a/sysdeps/mach/hurd/sigprocmask.c +++ b/sysdeps/mach/hurd/sigprocmask.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,2002 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 @@ -49,7 +49,7 @@ __sigprocmask (how, set, oset) switch (how) { case SIG_BLOCK: - ss->blocked |= new; + __sigorset (&ss->blocked, &ss->blocked, &new); break; case SIG_UNBLOCK: 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)) -- cgit v1.2.3