Add conditional splassert.

Reviewed by:	peter
This commit is contained in:
Paul Saab 2000-03-19 11:39:26 +00:00
parent cb2116539c
commit ca27a8d4cf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58283

View File

@ -76,9 +76,14 @@ extern int bootverbose; /* nonzero to print verbose messages */
#ifdef INVARIANTS /* The option is always available */
#define KASSERT(exp,msg) do { if (!(exp)) panic msg; } while (0)
#define SPLASSERT(level, msg) __CONCAT(__CONCAT(spl,level),assert)(msg)
#define CONDSPLASSERT(cond, level, msg) do { \
if (cond) \
SPLASSERT(level, msg); \
} while (0)
#else
#define KASSERT(exp,msg)
#define SPLASSERT(level, msg)
#define SPLASSERT(level, msg)
#define CONDSPLASSERT(cond, level, msg)
#endif
/*