Zephyr API Documentation
4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 Wind River Systems, Inc.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
14
#ifndef ZEPHYR_INCLUDE_ARCH_ARC_V2_ERROR_H_
15
#define ZEPHYR_INCLUDE_ARCH_ARC_V2_ERROR_H_
16
17
#include <
zephyr/arch/arc/syscall.h
>
18
#include <
zephyr/arch/arc/v2/exception.h
>
19
#include <
stdbool.h
>
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
25
/*
26
* use trap_s to raise a SW exception
27
*/
28
#define ARCH_EXCEPT(reason_p) do { \
29
__asm__ volatile ( \
30
"mov %%r0, %[reason]\n\t" \
31
"trap_s %[id]\n\t" \
32
: \
33
: [reason] "i" (reason_p), \
34
[id] "i" (_TRAP_S_CALL_RUNTIME_EXCEPT) \
35
: "memory"); \
36
CODE_UNREACHABLE;
/* LCOV_EXCL_LINE */
\
37
} while (false)
38
39
#ifdef __cplusplus
40
}
41
#endif
42
43
44
#endif
/* ZEPHYR_INCLUDE_ARCH_ARC_V2_ERROR_H_ */
exception.h
ARCv2 public exception handling.
syscall.h
ARC specific syscall header.
stdbool.h
zephyr
arch
arc
v2
error.h
Generated on Mon Dec 23 2024 09:02:41 for Zephyr API Documentation by
1.12.0