|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Files | |
| file | check.h |
| Header file for configurable error checking. | |
Macros | |
| #define | CHECKIF(expr) |
| Guard error-handling code with a configurable check. | |
| #define CHECKIF | ( | expr | ) |
#include <zephyr/sys/check.h>
Guard error-handling code with a configurable check.
Wrap a condition that evaluates to true when an error is detected, and a statement or block to run when that condition holds.
The behavior is configurable using Kconfig:
CONFIG_RUNTIME_ERROR_CHECKS (default) expands to if (expr)CONFIG_ASSERT_ON_ERRORS asserts, the guarded block is not runCONFIG_NO_RUNTIME_CHECKS checks are omitted at compile time| expr | Error condition expression. |