Zephyr Project API
3.2.0
A Scalable Open Source RTOS
fatal.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Intel Corporation.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
11
#ifndef ZEPHYR_INCLUDE_FATAL_H
12
#define ZEPHYR_INCLUDE_FATAL_H
13
14
#include <zephyr/arch/cpu.h>
15
#include <
zephyr/toolchain.h
>
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
27
enum
k_fatal_error_reason
{
29
K_ERR_CPU_EXCEPTION
,
30
32
K_ERR_SPURIOUS_IRQ
,
33
35
K_ERR_STACK_CHK_FAIL
,
36
38
K_ERR_KERNEL_OOPS
,
39
41
K_ERR_KERNEL_PANIC
42
43
/* TODO: add more codes for exception types that are common across
44
* architectures
45
*/
46
};
47
56
FUNC_NORETURN
void
k_fatal_halt
(
unsigned
int
reason);
57
87
void
k_sys_fatal_error_handler
(
unsigned
int
reason,
const
z_arch_esf_t *esf);
88
103
void
z_fatal_error(
unsigned
int
reason,
const
z_arch_esf_t *esf);
104
107
#ifdef __cplusplus
108
}
109
#endif
110
111
#endif
/* ZEPHYR_INCLUDE_FATAL_H */
k_fatal_error_reason
k_fatal_error_reason
Definition:
fatal.h:27
k_fatal_halt
FUNC_NORETURN void k_fatal_halt(unsigned int reason)
Halt the system on a fatal error.
k_sys_fatal_error_handler
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *esf)
Fatal error policy handler.
Definition:
main.c:49
K_ERR_STACK_CHK_FAIL
@ K_ERR_STACK_CHK_FAIL
Definition:
fatal.h:35
K_ERR_SPURIOUS_IRQ
@ K_ERR_SPURIOUS_IRQ
Definition:
fatal.h:32
K_ERR_KERNEL_PANIC
@ K_ERR_KERNEL_PANIC
Definition:
fatal.h:41
K_ERR_KERNEL_OOPS
@ K_ERR_KERNEL_OOPS
Definition:
fatal.h:38
K_ERR_CPU_EXCEPTION
@ K_ERR_CPU_EXCEPTION
Definition:
fatal.h:29
toolchain.h
Macros to abstract toolchain specific capabilities.
include
zephyr
fatal.h
Generated on Tue Feb 28 2023 15:43:19 for Zephyr Project API by
1.9.2