1 /*
2  * SPDX-License-Identifier: Apache-2.0
3  */
4 #ifndef ZEPHYR_SUBSYS_TESTSUITE_ZTEST_INCLUDE_ARCH_CPU_H
5 #define ZEPHYR_SUBSYS_TESTSUITE_ZTEST_INCLUDE_ARCH_CPU_H
6 
7 /* This file exists as a hack around Zephyr's dependencies */
8 
9 #include <inttypes.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 /* Architecture thread structure */
16 struct _callee_saved {
17 #ifdef CONFIG_CPP
18 	/* C++ does not allow empty structs, add an extra 1 byte */
19 	uint8_t c;
20 #endif
21 };
22 
23 typedef struct _callee_saved _callee_saved_t;
24 
25 struct _thread_arch {
26 #ifdef CONFIG_CPP
27 	/* C++ does not allow empty structs, add an extra 1 byte */
28 	uint8_t c;
29 #endif
30 };
31 
32 typedef struct _thread_arch _thread_arch_t;
33 
34 /* Architecture functions */
arch_k_cycle_get_32(void)35 static inline uint32_t arch_k_cycle_get_32(void)
36 {
37 	return 0;
38 }
39 
arch_k_cycle_get_64(void)40 static inline uint64_t arch_k_cycle_get_64(void)
41 {
42 	return 0;
43 }
44 
arch_irq_lock(void)45 static ALWAYS_INLINE unsigned int arch_irq_lock(void)
46 {
47 	return 0;
48 }
49 
arch_irq_unlock(unsigned int key)50 static inline void arch_irq_unlock(unsigned int key)
51 {
52 	ARG_UNUSED(key);
53 }
54 
arch_irq_unlocked(unsigned int key)55 static inline bool arch_irq_unlocked(unsigned int key)
56 {
57 	return 0;
58 }
59 
60 #ifdef __cplusplus
61 }
62 #endif /* __cplusplus */
63 
64 #include <zephyr/arch/arch_interface.h>
65 
66 
67 #endif /* ZEPHYR_SUBSYS_TESTSUITE_ZTEST_INCLUDE_ARCH_CPU_H */
68