Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libkern Add KDASSERTMSG (KDASSERT already exists).
details: https://anonhg.NetBSD.org/src/rev/963c29cd7994
branches: trunk
changeset: 761344:963c29cd7994
user: matt <matt%NetBSD.org@localhost>
date: Mon Jan 24 22:53:07 2011 +0000
description:
Add KDASSERTMSG (KDASSERT already exists).
diffstat:
sys/lib/libkern/libkern.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 7f02461b55a1 -r 963c29cd7994 sys/lib/libkern/libkern.h
--- a/sys/lib/libkern/libkern.h Mon Jan 24 22:06:31 2011 +0000
+++ b/sys/lib/libkern/libkern.h Mon Jan 24 22:53:07 2011 +0000
@@ -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 @@
#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))
Home |
Main Index |
Thread Index |
Old Index