|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "common/stdint.h"Go to the source code of this file.
Functions | |
| bool | panic_in_progress (void) |
| check whether a core has started a panic. | |
| void | kernel_panic (const char *message) __attribute__((noreturn)) |
| trigger a kernel panic, display error message and halt the system. | |
| void | kernel_panic_at (const char *message, uintptr_t pc, uintptr_t caller, uintptr_t frame) __attribute__((noreturn)) |
| panic on behalf of a trapped context (cpu exception, page fault). | |
| bool panic_in_progress | ( | void | ) |
check whether a core has started a panic.
the other cores then get an NMI (ARCH_IPI_STOP), and their NMI handler halts.
| void kernel_panic | ( | const char * | message | ) |
trigger a kernel panic, display error message and halt the system.
prints a backtrace of the caller.
| message | description of the panic condition. |
panic on behalf of a trapped context (cpu exception, page fault).
prints the faulting pc and a backtrace from the trapped frame instead of the handler's own stack.
| message | description of the panic condition. |
| pc | the faulting instruction address. |
| caller | a probable return address into the faulting function's caller, printed as an uncertain "?" entry, or 0. this recovers the caller when the fault hit a function without a frame of its own (a frameless leaf or a prologue). |
| frame | the frame pointer at the fault, or 0 to skip the backtrace (e.g. the fault came from user mode). |