Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Files

file  check.h
 Header file for configurable error checking.

Macros

#define CHECKIF(expr)
 Guard error-handling code with a configurable check.

Detailed Description

Since
2.2
Version
1.0.0

Macro Definition Documentation

◆ CHECKIF

#define CHECKIF ( expr)

#include <zephyr/sys/check.h>

Value:
if (expr)

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.

CHECKIF(dev == NULL) {
return -EINVAL;
}
#define CHECKIF(expr)
Guard error-handling code with a configurable check.
Definition check.h:54
#define EINVAL
Invalid argument.
Definition errno.h:61

The behavior is configurable using Kconfig:

Parameters
exprError condition expression.