mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Add conditional splassert.
Reviewed by: peter
This commit is contained in:
parent
cb2116539c
commit
ca27a8d4cf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58283
@ -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
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user