void
KASSERT(expression)
void
KDASSERT(expression)
KASSERT()
tests are included only in kernels compiled with the
DIAGNOSTIC
configuration option.
In a kernel that does not have this configuration option, the
KASSERT()
macro is defined to be a no-op.
KDASSERT()
tests are included only in kernels compiled with the
DEBUG
configuration option.
KDASSERT()
and
KASSERT()
are identical except for the controlling option
(DEBUG
vs
DIAGNOSTIC).
The panic message will display the style of assertion (debugging vs. diagnostic), the expression that failed and the filename, and line number the failure happened on.