Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cpu.h
Go to the documentation of this file.
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
12extern "C" {
13#endif
14
15/* Architecture thread structure */
16struct _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
23typedef struct _callee_saved _callee_saved_t;
24
25struct _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
32typedef struct _thread_arch _thread_arch_t;
33
34/* Architecture functions */
35static inline uint32_t arch_k_cycle_get_32(void)
36{
37 return 0;
38}
39
40static inline uint64_t arch_k_cycle_get_64(void)
41{
42 return 0;
43}
44
45static ALWAYS_INLINE unsigned int arch_irq_lock(void)
46{
47 return 0;
48}
49
50static inline void arch_irq_unlock(unsigned int key)
51{
52 ARG_UNUSED(key);
53}
54
55static inline bool arch_irq_unlocked(unsigned int key)
56{
57 return 0;
58}
59
60#ifdef __cplusplus
61}
62#endif /* __cplusplus */
63
65
66
67#endif /* ZEPHYR_SUBSYS_TESTSUITE_ZTEST_INCLUDE_ARCH_CPU_H */
#define ALWAYS_INLINE
Definition: common.h:129
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
static ALWAYS_INLINE unsigned int arch_irq_lock(void)
Definition: cpu.h:45
static bool arch_irq_unlocked(unsigned int key)
Definition: cpu.h:55
static uint32_t arch_k_cycle_get_32(void)
Definition: cpu.h:35
static void arch_irq_unlock(unsigned int key)
Definition: cpu.h:50
static uint64_t arch_k_cycle_get_64(void)
Definition: cpu.h:40