void ASSERT(int expression);
ASSERT is a debugging interface for verifying program invariants
within code that is compiled with the DEBUG compilation option
Expression to be evaluated.
If expression evaluates to non-zero,
ASSERT returns no value.
If expression evaluates to 0,
ASSERT panics the system.
expression is a boolean expression that the caller expects to
evaluate to non-zero (that is, the caller is asserting that the expression
has a non-zero value).
If expression evaluates to non-zero, the ASSERT
call has no effect.
If expression evaluates to zero, ASSERT causes the system
to panic with the following message:
PANIC: assertion failed: expression, file: filename, line: lineno
where filename is the name of the source file in which the failed
assertion appears and lineno is the line number of the ASSERT
call within the file.
function to check that the value
of variables and structure members is correct
at various stages of execution.
evaluates a simple expression and,
if it is not true,
panics the system at that point
so you can use a
to analyze the kernel.
is ignored except when the driver
is compiled with the -DDEBUG flag.
Context and synchronization
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005