Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
structs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) BayLibre SAS
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/*
8 * The purpose of this file is to provide essential/minimal architecture-
9 * specific structure definitions to be included in generic kernel
10 * structures.
11 *
12 * The following rules must be observed:
13 * 1. arch/structs.h shall not depend on kernel.h both directly and
14 * indirectly (i.e. it shall not include any header files that include
15 * kernel.h in their dependency chain).
16 * 2. kernel.h shall imply arch/structs.h via kernel_structs.h , such that
17 * it shall not be necessary to include arch/structs.h explicitly when
18 * kernel.h is included.
19 */
20
21#ifndef ZEPHYR_INCLUDE_ARCH_STRUCTS_H_
22#define ZEPHYR_INCLUDE_ARCH_STRUCTS_H_
23
24#if !defined(_ASMLANGUAGE)
25
26#if defined(CONFIG_ARM64)
28#elif defined(CONFIG_RISCV)
30#elif defined(CONFIG_ARM)
32#elif defined(CONFIG_X86) && !defined(CONFIG_X86_64)
34#elif defined(CONFIG_XTENSA)
36#elif defined(CONFIG_TRICORE)
38#else
39
40/* Default definitions when no architecture specific definitions exist. */
41
42/* Per CPU architecture specifics (empty) */
43struct _cpu_arch {
44#ifdef __cplusplus
45 /* An empty struct is not valid C, and compilers that accept it give
46 * it size 0 while C++ gives 1. Keep a byte so both languages agree.
47 */
48 uint8_t dummy;
49#endif
50};
51
52#endif
53
54/* typedefs to be used with GEN_OFFSET_SYM(), etc. */
55typedef struct _cpu_arch _cpu_arch_t;
56
57#endif /* _ASMLANGUAGE */
58
59#endif /* ZEPHYR_INCLUDE_ARCH_STRUCTS_H_ */
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
TriCore per-CPU arch structure.