Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
panic.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014, 2015 INRIA
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
22
#ifndef PANIC_H
23
#define PANIC_H
24
25
#include "
kernel_defines.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
34
typedef
enum
{
35
PANIC_GENERAL_ERROR,
36
PANIC_SOFT_REBOOT,
37
PANIC_HARD_REBOOT,
38
PANIC_ASSERT_FAIL,
39
PANIC_EXPECT_FAIL,
40
#ifdef MODULE_CORTEXM_COMMON
41
PANIC_NMI_HANDLER,
42
PANIC_HARD_FAULT,
43
#if defined(CPU_CORE_CORTEX_M3) || defined(CPU_CORE_CORTEX_M33) || \
44
defined(CPU_CORE_CORTEX_M4) || defined(CPU_CORE_CORTEX_M4F) || \
45
defined(CPU_CORE_CORTEX_M7)
46
PANIC_MEM_MANAGE,
47
PANIC_BUS_FAULT,
48
PANIC_USAGE_FAULT,
49
PANIC_DEBUG_MON,
50
#endif
51
PANIC_DUMMY_HANDLER,
52
#endif
53
PANIC_SSP
,
54
PANIC_UNDEFINED
55
}
core_panic_t
;
56
77
NORETURN
void
core_panic
(
core_panic_t
crash_code,
const
char
*message);
78
85
void
panic_arch
(
void
);
86
87
#ifdef __cplusplus
88
}
89
#endif
90
91
#endif
/* PANIC_H */
92
kernel_defines.h
Common macros and compiler attributes/pragmas configuration.
panic_arch
void panic_arch(void)
architecture dependent handling of a panic case
PANIC_SSP
@ PANIC_SSP
stack smashing protector failure
Definition:
panic.h:53
core_panic_t
core_panic_t
Definition of available panic modes.
Definition:
panic.h:34
NORETURN
#define NORETURN
The NORETURN keyword tells the compiler to assume that the function cannot return.
Definition:
kernel_defines.h:74
core_panic
NORETURN void core_panic(core_panic_t crash_code, const char *message)
Handle an unrecoverable error by halting or rebooting the system.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17