Zephyr API Documentation
3.6.0
A Scalable Open Source RTOS
3.6.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
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 <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 Sat Feb 24 2024 03:45:05 for Zephyr API Documentation by
1.9.6