|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "panic.h"Go to the source code of this file.
Macros | |
| #define | ASSERT(condition) |
| assert that a condition is true. | |
| #define | KASSERT(condition, msg) |
| debug-only assertion. | |
| #define ASSERT | ( | condition | ) |
assert that a condition is true.
if false, trigger a kernel panic.
| condition | boolean expression to test. |
this macro is NOT compiled out in any build configuration. it expands to a direct call to kernel_panic(), which halts the CPU unconditionally. use for invariants that must hold regardless of build type.
| #define KASSERT | ( | condition, | |
| msg ) |
debug-only assertion.
stripped when NDEBUG is defined (release builds). use for expensive checks or invariants only needed during development.
| condition | boolean expression to test. |
| msg | string literal describing the failure. |