DragonFly On-Line Manual Pages

Search: Section:  

KASSERT(9)	      DragonFly Kernel Developer's Manual	    KASSERT(9)


KASSERT, KKASSERT -- kernel expression verification macros


options INVARIANTS KASSERT(expression, const char *msg); KKASSERT(expression);


The macros described in this manual page are no-op unless the kernel is compiled with options INVARIANTS. The KASSERT() macro tests the given expression and if it is false, the panic(9) function is called to display msg and terminate the running sys- tem. The KKASSERT() macro is similar to KASSERT(), except it does not require a description message but instead displays expression and terminates the running system.


The kernel function vput() must not be called with a NULL pointer. void vput(struct vnode *vp) { struct thread *td = curthread; KASSERT(vp != NULL, ("vput: null vp")); ... }


config(8), panic(9)


This manual page was written by Jonathan M. Bresler <jmb@FreeBSD.org> and modified for DragonFly by Hiten Pandya <hmp@dragonflybsd.org>. DragonFly 5.3 May 10, 2004 DragonFly 5.3

Search: Section: