man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

ASSERT(9F)

Name

ASSERT, assert - expression verification

Synopsis

#include <sys/debug.h>

void ASSERT(EX);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

EX

boolean expression.

Description

The ASSERT() macro checks to see if the expression EX is true. If it is not, then ASSERT() causes an error message to be logged to the console and the system to panic. ASSERT() works only if the preprocessor symbol DEBUG is defined.

Context

The ASSERT() macro can be used from user, interrupt, or kernel context.

See Also

Writing Device Drivers for Oracle Solaris 11.2