Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
check.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_SYS_CHECK_H_
14#define ZEPHYR_INCLUDE_SYS_CHECK_H_
15
16#include <zephyr/sys/__assert.h>
17
23
44#if defined(CONFIG_ASSERT_ON_ERRORS)
45#define CHECKIF(expr) \
46 __ASSERT_NO_MSG(!(expr)); \
47 if (0)
48#elif defined(CONFIG_NO_RUNTIME_CHECKS)
49#define CHECKIF(...) \
50 if (0)
51#else
52#define CHECKIF(expr) \
53 if (expr)
54#endif
55
57
58#endif /* ZEPHYR_INCLUDE_SYS_CHECK_H_ */