9762 Split the custr functions into their own library
[unleashed.git] / usr / src / man / man9f / ASSERT.9f
blob21c44dbff8fd603166ae447e650eaeac86461f94
1 '\" te
2 .\" Copyright (c) 2006, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ASSERT 9F "Jan 16, 2006"
7 .SH NAME
8 ASSERT, assert \- expression verification
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/debug.h>
16 \fBvoid\fR \fBASSERT\fR(\fB\fR\fIEX\fR);
17 .fi
19 .SH INTERFACE LEVEL
20 .sp
21 .LP
22 Architecture independent level 1 (DDI/DKI).
23 .SH PARAMETERS
24 .sp
25 .ne 2
26 .na
27 \fB\fIEX\fR\fR
28 .ad
29 .RS 6n
30 boolean expression.
31 .RE
33 .SH DESCRIPTION
34 .sp
35 .LP
36 The \fBASSERT()\fR macro checks to see if the expression \fIEX\fR is true. If
37 it is not, then \fBASSERT()\fR causes an error message to be logged to the
38 console and the system to panic. \fBASSERT()\fR works only if the preprocessor
39 symbol \fBDEBUG\fR is defined.
40 .SH CONTEXT
41 .sp
42 .LP
43 The \fBASSERT()\fR macro can be used from user, interrupt, or kernel context.
44 .SH SEE ALSO
45 .sp
46 .LP
47 \fIWriting Device Drivers\fR