KDASSERT man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

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

NAME
     KASSERT, KASSERTMSG, KDASSERT, KDASSERTMSG — kernel expression verifica‐
     tion macros

SYNOPSIS
     void
     KASSERT(expression);

     void
     KASSERTMSG(expression, format, ...);

     void
     KDASSERT(expression);

     void
     KDASSERTMSG(expression, format, ...);

DESCRIPTION
     These machine independent assertion-checking macros cause a kernel
     panic(9) if the given expression evaluates to false.  Two compile-time
     options(4) define the behavior of the checks.

       1.   The KASSERT() and KASSERTMSG() tests are included only in kernels
	    compiled with the DIAGNOSTIC configuration option.	In a kernel
	    that does not have this configuration option, the macros are
	    defined to be no-ops.

       2.   The KDASSERT() and KDASSERTMSG() tests are included only in ker‐
	    nels compiled with the DEBUG configuration option.	The KDASSERT()
	    and KASSERT() macros are identical except for the controlling
	    option (DEBUG vs DIAGNOSTIC).  Basically, KASSERT() should be used
	    for light-weight checks and KDASSERT() should be used for heavier
	    ones.

     Callers should not rely on the side effects of expression because,
     depending on the kernel compile options mentioned above, expression might
     not be evaluated at all.

     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.  The KASSERTMSG() and KDASSERTMSG() macros
     append to the panic(9) format string the message specified by format and
     its subsequent arguments, similar to printf(9) functions.

SEE ALSO
     config(1), options(4), CTASSERT(9), panic(9), printf(9)

AUTHORS
     These macros were written by Chris G. Demetriou ⟨cgd@netbsd.org⟩.

BSD			      September 27, 2011			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net