Add KDASSERTMSG (KDASSERT already exists).
This commit is contained in:
parent
e4b7bc4a76
commit
084c578c30
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: libkern.h,v 1.94 2010/04/25 15:39:41 rmind Exp $ */
|
||||
/* $NetBSD: libkern.h,v 1.95 2011/01/24 22:53:07 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -223,10 +223,16 @@ tolower(int ch)
|
||||
#ifndef DEBUG
|
||||
#ifdef lint
|
||||
#define KDASSERT(e) /* NOTHING */
|
||||
#define KDASSERTMSG(e) /* NOTHING */
|
||||
#else /* lint */
|
||||
#define KDASSERT(e) ((void)0)
|
||||
#define KDASSERTMSG(e) ((void)0)
|
||||
#endif /* lint */
|
||||
#else
|
||||
#define KDASSERTMSG(e, msg) do { \
|
||||
if (__predict_false(!(e))) \
|
||||
panic msg; \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
#ifdef __STDC__
|
||||
#define KDASSERT(e) (__predict_true((e)) ? (void)0 : \
|
||||
kern_assert("debugging ", __FILE__, __LINE__, #e))
|
||||
|
Loading…
Reference in New Issue
Block a user