PebbleOS
Loading...
Searching...
No Matches
Fatal errors

Stop the system on an unrecoverable error. More...

Macros

#define pbl_panic(...)   PBL_PANIC_SELECT(__VA_OPT__(MESSAGE))(__VA_ARGS__)
 Stop the system.
 

Functions

void pbl_fatal_error_handler (uintptr_t lr)
 Handle a fatal error.
 

Detailed Description

Stop the system on an unrecoverable error.

The kernel logs the error with the address of the code that raised it, then hands over to pbl_fatal_error_handler(), which the platform implements.

switch (state) {
case STATE_IDLE:
break;
case STATE_BUSY:
pbl_panic("busy since %u", s_busy_since);
default:
}
#define pbl_panic(...)
Stop the system.
Definition fatal.h:77

Macro Definition Documentation

◆ pbl_panic

#define pbl_panic (   ...)    PBL_PANIC_SELECT(__VA_OPT__(MESSAGE))(__VA_ARGS__)

Stop the system.

Without arguments only the address of the caller is logged, the cheapest form, and the call is an expression.

Parameters
...Optional printf-style message, a string literal, and its arguments.

Function Documentation

◆ pbl_fatal_error_handler()

void pbl_fatal_error_handler ( uintptr_t  lr)

Handle a fatal error.

Implemented by the platform; the kernel calls it once the error is logged. It must not return, e.g. it saves a core dump and reboots.

Parameters
lrAddress of the code that raised the error.