Subject: Re: where is KASSERT(9) documented?
To: Igor Sobrado <igor@string1.ciencias.uniovi.es>
From: Igor Sobrado <igor@string1.ciencias.uniovi.es>
List: tech-kern
Date: 04/18/2006 00:12:15
--Boundary_(ID_UrW5FmyWkAw8jDjA49QYpQ)
Content-id: <17617.1145311932.1@string1.ciencias.uniovi.es>
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Ok, there is a first *draft* of the KASSERT(9)/KDASSERT(9) manual page.
There are a lot of sections to be written (e.g., EXAMPLES, STANDARDS
-if any-, HISTORY and, possible, AUTHORS).
I am sure, it needs a lot of technical improvements before being
considered for a style revision. Please, be as tricky as possible.
I want to submit the best manual page! :-)
Best regards,
Igor.
--Boundary_(ID_UrW5FmyWkAw8jDjA49QYpQ)
Content-id: <17617.1145311932.2@string1.ciencias.uniovi.es>
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
.\" $NetBSD: mdoc.template,v 1.7 2002/07/10 11:57:12 yamt Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by XXX.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 17, 2006
.Dt KASSERT 9
.Os
.Sh NAME
.Nm KASSERT ,
.Nm KDASSERT
.Nd kernel expression verification macros
.Sh SYNOPSIS
.Ft void
.Fn KASSERT expression msg
.Ft void
.Fn KDASSERT expression msg
.Sh DESCRIPTION
These machine independent assertion-checking macros cause a kernel
.Xr panic 9
if the given
.Ar expression
evaluates to false, terminating the running system.
.Pp
.Fn KASSERT
tests are only included in kernels compiled with the DIAGNOSTIC configuration
option. In a kernel that does not have this configuration option, the
.Fn KASSERT
macro is defined to be a no-op.
.Pp
.Fn KDASSERT
tests are only included in kernels that has been compiled with the DEBUG
configuration option.
.Fn KDASSERT
behaves essentially like the above verification macro.
.Pp
The second argument to both macros, that is
.Ar msg ,
is a
.Xr printf 9
format string whose arguments are enclosed in parentheses.
.Sh EXAMPLES
.Sh SEE ALSO
.\" Cross-references should be ordered by section (low to high), then in
.\" alphabetical order.
.Xr config 8 ,
.Xr panic 9 ,
.Xr printf 9
.Sh STANDARDS
.Sh HISTORY
.Sh AUTHORS
--Boundary_(ID_UrW5FmyWkAw8jDjA49QYpQ)--