*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> KASSERT (9)              
Title
Content
Arch
Section
 

KASSERT(9)

Contents


NAME    [Toc]    [Back]

     KASSERT -- kernel expression verification macro

SYNOPSIS    [Toc]    [Back]

     options INVARIANTS

     #include <sys/param.h>
     #include <sys/systm.h>

     KASSERT(expression, msg);

DESCRIPTION    [Toc]    [Back]

     In a kernel compiled with options INVARIANTS, the KASSERT() macro tests
     the given expression and if it is false, calls the panic(9) function,
     terminating the running system.

     In a kernel that does not have options INVARIANTS, the KASSERT() macro is
     defined to be a no-op.  The second argument is a printf(9) format string
     and its arguments, enclosed in parentheses.

EXAMPLES    [Toc]    [Back]

     The kernel function vput() must not be called with a NULL pointer.

	   void
	   vput(vp)
		   struct vnode *vp;
	   {
		   struct proc *p = curproc;
		   KASSERT(vp != NULL, ("vput: null vp"));
		   ...
	   }

SEE ALSO    [Toc]    [Back]

      
      
     config(8), panic(9)

AUTHORS    [Toc]    [Back]

     This manual page was written by Jonathan M. Bresler <[email protected]>.


FreeBSD 5.2.1		       January 14, 2000 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
assert FreeBSD expression verification macro
assert OpenBSD expression verification macro
assert NetBSD expression verification macro
_DIAGASSERT NetBSD expression verification macro
MULTI_DRIVER_MODULE FreeBSD kernel driver declaration macro
DRIVER_MODULE FreeBSD kernel driver declaration macro
DECLARE_MODULE FreeBSD kernel module declaration macro
SYSCALL_MODULE FreeBSD syscall kernel module declaration macro
m4 IRIX macro processor
m4 Tru64 GNU m4 macro processor
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service