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) 2023 Arm Limited (or its affiliates). All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef ZEPHYR_INCLUDE_ARCH_ARM_STRUCTS_H_
7#define ZEPHYR_INCLUDE_ARCH_ARM_STRUCTS_H_
8
9#include <zephyr/types.h>
10
11#if defined(CONFIG_CPU_AARCH32_CORTEX_A) || defined(CONFIG_CPU_AARCH32_CORTEX_R)
12/* Per CPU architecture specifics */
13struct _cpu_arch {
14 int8_t exc_depth;
15#if defined(CONFIG_ARM_TRACK_ACTIVE_IRQ)
16 /*
17 * INTID currently being serviced on this CPU, biased by one so
18 * that the zero-initialized boot state reads as "none". Maintained
19 * by the ISR wrapper; read through arch_irq_get_active().
20 */
21 uint32_t active_irq;
22#endif
23};
24
25#else
26
27/* Default definitions when no architecture specific definitions exist. */
28
29/* Per CPU architecture specifics (empty) */
30struct _cpu_arch {
31#ifdef __cplusplus
32 /* This struct will have a size 0 in C which is not allowed in C++ (it'll have a size 1). To
33 * prevent this, we add a 1 byte dummy variable.
34 */
35 uint8_t dummy;
36#endif
37};
38
39#endif
40
41#endif /* ZEPHYR_INCLUDE_ARCH_ARM_STRUCTS_H_ */
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__INT8_TYPE__ int8_t
Definition stdint.h:72