#include <logging.h>
#include <stdbool.h>
|
#define | PANIC(...) __PANIC(true, __VA_ARGS__, "\n") |
| This macro should only be used when something goes terribly wrong.
|
|
#define | PANIC_NO_STACKTRACE(...) __PANIC(false, __VA_ARGS__, "\n") |
|
- See also
- https://en.wikipedia.org/wiki/Kernel_panic
This file mainly contains the macros to use for kernel panics.
◆ PANIC_NO_STACKTRACE
#define PANIC_NO_STACKTRACE |
( |
| ... | ) |
__PANIC(false, __VA_ARGS__, "\n") |
This macro is similar to PANIC()
but it won't attempt to print a stacktrace.
◆ kernel_dump_stacktrace()
void kernel_dump_stacktrace |
( |
| ) |
|
Dumps a stacktrace on both the standard and debug outputs (unless both are the same, in which case we do not print the debug messages).
◆ kernel_panic()
void kernel_panic |
( |
bool | dump_stacktrace, |
|
|
const char * | format, |
|
|
| ... ) |
Handles a kernel panic.
- Parameters
-
dump_stacktrace | whether to dump a stacktrace |
format | the reason for the kernel panic |