Crash handling header. More...
Crash handling header.
Define a core_panic function that allows to stop/reboot the system when an unrecoverable problem has occurred.
Definition in file panic.h.
#include "kernel_defines.h" Include dependency graph for panic.h:
 Include dependency graph for panic.h: This graph shows which files directly or indirectly include this file:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| #define | CONFIG_CORE_REBOOT_ON_PANIC (0) | 
| Automatically reboot the system on panic() | |
| enum | core_panic_t { PANIC_GENERAL_ERROR , PANIC_SOFT_REBOOT , PANIC_HARD_REBOOT , PANIC_ASSERT_FAIL , PANIC_EXPECT_FAIL , PANIC_MEM_MANAGE , PANIC_SSP , PANIC_STACK_OVERFLOW , PANIC_UNDEFINED } | 
| Definition of available panic modes.  More... | |
| NORETURN void | core_panic (core_panic_t crash_code, const char *message) | 
| Handle an unrecoverable error by halting or rebooting the system. | |
| void | panic_arch (void) | 
| architecture dependent handling of a panic case | |
| #define CONFIG_CORE_REBOOT_ON_PANIC (0) | 
| enum core_panic_t | 
| NORETURN void core_panic | ( | core_panic_t | crash_code, | 
| const char * | message ) | 
Handle an unrecoverable error by halting or rebooting the system.
A numeric code indicating the failure reason can be given as the crash_code parameter.
Detailing the failure is possible using the message parameter. This function should serve a similar purpose as the panic() function of Unix/Linux kernels.
If the DEVELHELP macro is defined, the system will be halted; the system will be rebooted otherwise.
| [in] | crash_code | a unique code for identifying the crash reason | 
| [in] | message | a human readable reason for the crash | 
| void panic_arch | ( | void | ) | 
architecture dependent handling of a panic case
This function gives the CPU the possibility to execute architecture dependent code in case of a severe error.