diff options
author | Eivind Eklund <eivind@FreeBSD.org> | 1999-01-08 17:31:30 +0000 |
---|---|---|
committer | Eivind Eklund <eivind@FreeBSD.org> | 1999-01-08 17:31:30 +0000 |
commit | 5526d2d920eb17b1507499f35b275b486f7fe8d0 (patch) | |
tree | c3aa8110c730b536d4b76b776fd65a60d1a70818 /sys/kern/kern_sig.c | |
parent | 95ddc5daa5374332a4bc16c64c498099fa823adf (diff) | |
download | src-5526d2d920eb17b1507499f35b275b486f7fe8d0.tar.gz src-5526d2d920eb17b1507499f35b275b486f7fe8d0.zip |
Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT as
discussed on -hackers.
Introduce 'KASSERT(assertion, ("panic message", args))' for simple
check + panic.
Reviewed by: msmith
Notes
Notes:
svn path=/head/; revision=42408
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 dd4a4318ae3d..e9a51d4c76f3 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. |