Fix KASSERTMSG() to be consistent with KASSERT() logic, not inverted.
Hi matt@!
This commit is contained in:
parent
4a9e14b923
commit
84b7918250
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: syscall.c,v 1.40 2009/12/14 18:39:19 skrll Exp $ */
|
||||
/* $NetBSD: syscall.c,v 1.41 2010/04/25 15:39:41 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.40 2009/12/14 18:39:19 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.41 2010/04/25 15:39:41 rmind Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_sa.h"
|
||||
@ -174,7 +174,9 @@ EMULNAME(syscall)(struct lwp *l, u_int status, u_int cause, vaddr_t opc)
|
||||
int code, error;
|
||||
#if defined(__mips_o32)
|
||||
const int abi = _MIPS_BSD_API_O32;
|
||||
KASSERTMSG(p->p_md.md_abi != abi, ("pid %d(%p): md_abi(%d) != abi(%d)", p->p_pid, p, p->p_md.md_abi, abi));
|
||||
KASSERTMSG(p->p_md.md_abi == abi,
|
||||
("pid %d(%p): md_abi(%d) != abi(%d)",
|
||||
p->p_pid, p, p->p_md.md_abi, abi));
|
||||
size_t nregs = 4;
|
||||
#else
|
||||
const int abi = p->p_md.md_abi;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: siisata.c,v 1.10 2010/04/07 17:51:16 jakllsch Exp $ */
|
||||
/* $NetBSD: siisata.c,v 1.11 2010/04/25 15:39:41 rmind Exp $ */
|
||||
|
||||
/* from ahcisata_core.c */
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.10 2010/04/07 17:51:16 jakllsch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.11 2010/04/25 15:39:41 rmind Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -1183,7 +1183,7 @@ siisata_activate_prb(struct siisata_channel *schp, int slot)
|
||||
|
||||
sc = (struct siisata_softc *)schp->ata_channel.ch_atac;
|
||||
|
||||
KASSERTMSG(((schp->sch_active_slots & __BIT(slot)) == __BIT(slot)),
|
||||
KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != __BIT(slot),
|
||||
("%s: trying to activate active slot %d", SIISATANAME(sc), slot));
|
||||
|
||||
SIISATA_PRB_SYNC(sc, schp, slot, BUS_DMASYNC_PREWRITE);
|
||||
@ -1205,7 +1205,7 @@ siisata_deactivate_prb(struct siisata_channel *schp, int slot)
|
||||
|
||||
sc = (struct siisata_softc *)schp->ata_channel.ch_atac;
|
||||
|
||||
KASSERTMSG(((schp->sch_active_slots & __BIT(slot)) == 0),
|
||||
KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != 0,
|
||||
("%s: trying to deactivate inactive slot %d", SIISATANAME(sc),
|
||||
slot));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: libkern.h,v 1.93 2010/01/19 22:28:30 pooka Exp $ */
|
||||
/* $NetBSD: libkern.h,v 1.94 2010/04/25 15:39:41 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -208,7 +208,7 @@ tolower(int ch)
|
||||
#else /* DIAGNOSTIC */
|
||||
#define _DIAGASSERT(a) assert(a)
|
||||
#define KASSERTMSG(e, msg) do { \
|
||||
if (__predict_false((e))) \
|
||||
if (__predict_false(!(e))) \
|
||||
panic msg; \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
#ifdef __STDC__
|
||||
|
Loading…
Reference in New Issue
Block a user