diff options
author | eivind <eivind@FreeBSD.org> | 1999-01-08 17:31:30 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-01-08 17:31:30 +0000 |
commit | a8dc66f457be84eefbe16e70c901ceb11137ba65 (patch) | |
tree | e5747f527c552fa90334c779c047697b372582fb /sys/kern/kern_sig.c | |
parent | 1c69824749ed0aa6efce159d39ab3f17fc9e25f2 (diff) | |
download | FreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.zip FreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.tar.gz |
Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT as
discussed on -hackers.
Introduce 'KASSERT(assertion, ("panic message", args))' for simple
check + panic.
Reviewed by: msmith
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index dd4a431..e9a51d4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94 - * $Id: kern_sig.c,v 1.50 1998/12/02 01:53:48 eivind Exp $ + * $Id: kern_sig.c,v 1.51 1998/12/19 02:55:33 julian Exp $ */ #include "opt_compat.h" @@ -1183,10 +1183,8 @@ postsig(signum) register sig_t action; int code, mask, returnmask; -#ifdef DIAGNOSTIC - if (signum == 0) - panic("postsig"); -#endif + KASSERT(signum != 0, ("postsig")); + mask = sigmask(signum); p->p_siglist &= ~mask; action = ps->ps_sigact[signum]; @@ -1214,10 +1212,8 @@ postsig(signum) /* * If we get here, the signal must be caught. */ -#ifdef DIAGNOSTIC - if (action == SIG_IGN || (p->p_sigmask & mask)) - panic("postsig action"); -#endif + KASSERT(action != SIG_IGN && (p->p_sigmask & mask) == 0, + ("postsig action")); /* * Set the new mask value and also defer further * occurences of this signal. |