1.1. assert — Assertions¶
Source code: src/kernel/assert.h
Defines
-
FATAL(n)¶
-
IS_FATAL(n)¶ Check is an error code is fatal (negative error code).
-
ASSERT(cond, ...)¶ Assert given condition and print an error message on assertion failure. Call the system on fatal callback with error code
EASSERTon fatal error, otherwise return NULL.
-
ASSERTN(cond, n, ...)¶ Assert given condition and print an error message on assertion failure. Call the system on fatal callback with given error code
non fatal error, otherwise return the error code negated.
-
ASSERTRV(cond, ...)¶ Assert given condition and print an error message on assertion failure. Call the system on fatal callback with error code
EASSERTon fatal error, otherwise return NULL.
-
ASSERTRN(cond, ...)¶ Assert given condition and print an error message on assertion failure. Call the system on fatal callback with error code
EASSERTon fatal error, otherwise return NULL.
-
ASSERTNR(cond, n, ...)¶ Assert given condition and print an error message. Call the system on fatal callback with given error code
non fatal error, otherwise return given error coderes.
-
ASSERTNRV(cond, n, ...)¶ Assert given condition and print an error message on assertion failure. Call the system on fatal callback with given error code
non fatal error, otherwise return.
-
ASSERTNRN(cond, n, ...)¶ Assert given condition and print an error message on assertion failure. Call the system on fatal callback with given error code
non fatal error, otherwise return NULL.
-
FATAL_ASSERTN(cond, n, ...)¶ Assert given condition and print an error message on assertion failure, then call the system on fatal callback with given error code
n.This assertion is not affected by
CONFIG_ASSERT, but insteadCONFIG_FATAL_ASSERT.
-
FATAL_ASSERT(cond, ...)¶ Assert given condition and print an error message on assertion failure, then call the system on fatal callback with error code
EASSERT.This assertion is not affected by
CONFIG_ASSERT, but insteadCONFIG_FATAL_ASSERT.
-
PANIC_ASSERTN(cond, n, ...)¶ Assert given condition and call
sys_panic()with given error codenon assertion failure.This assertion is not affected by
CONFIG_ASSERT, but insteadCONFIG_PANIC_ASSERT.
-
PANIC_ASSERT(cond, ...)¶ Assert given condition and call
sys_panic()with error codeEASSERT.This assertion is not affected by
CONFIG_ASSERT, but insteadCONFIG_PANIC_ASSERT.