Zephyr API Documentation
4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 BayLibre, SAS
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
14
#ifndef ZEPHYR_INCLUDE_ARCH_RISCV_ERROR_H_
15
#define ZEPHYR_INCLUDE_ARCH_RISCV_ERROR_H_
16
17
#include <
zephyr/arch/riscv/syscall.h
>
18
#include <
zephyr/arch/riscv/exception.h
>
19
#include <
stdbool.h
>
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
25
#ifdef CONFIG_USERSPACE
26
27
#define ARCH_EXCEPT(reason_p) do { \
28
if (k_is_user_context()) { \
29
arch_syscall_invoke1(reason_p, \
30
K_SYSCALL_USER_FAULT); \
31
} else { \
32
compiler_barrier(); \
33
arch_syscall_invoke1(reason_p, \
34
RV_ECALL_RUNTIME_EXCEPT);\
35
} \
36
CODE_UNREACHABLE;
/* LCOV_EXCL_LINE */
\
37
} while (false)
38
#else
39
#define ARCH_EXCEPT(reason_p) \
40
arch_syscall_invoke1(reason_p, RV_ECALL_RUNTIME_EXCEPT)
41
#endif
42
43
__syscall
void
user_fault
(
unsigned
int
reason);
44
45
#include <zephyr/syscalls/error.h>
46
47
#ifdef __cplusplus
48
}
49
#endif
50
51
#endif
/* ZEPHYR_INCLUDE_ARCH_RISCV_ERROR_H_ */
syscall.h
RISCV specific syscall header.
user_fault
void user_fault(unsigned int reason)
exception.h
RISCV public exception handling.
stdbool.h
zephyr
arch
riscv
error.h
Generated on Fri Nov 15 2024 00:03:19 for Zephyr API Documentation by
1.12.0