Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
arch_inlines.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2024 Infineon Technologies AG,
3 * SPDX-FileCopyrightText: or an affiliate of Infineon Technologies AG. All rights reserved.
4 * SPDX-FileCopyrightText: Copyright (c) 2026 Linumiz
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
13
14#ifndef ZEPHYR_INCLUDE_ARCH_TRICORE_ARCH_INLINES_H_
15#define ZEPHYR_INCLUDE_ARCH_TRICORE_ARCH_INLINES_H_
16
18
19#ifndef _ASMLANGUAGE
20
22
24
26{
27 return 0;
28}
29
30static ALWAYS_INLINE _cpu_t *arch_curr_cpu(void)
31{
32#if defined(CONFIG_SMP)
33 return &_kernel.cpus[arch_proc_id()];
34#else
35 return &_kernel.cpus[0];
36#endif
37}
38
39static ALWAYS_INLINE unsigned int arch_num_cpus(void)
40{
41 return CONFIG_MP_MAX_NUM_CPUS;
42}
43
45
46#endif /* !_ASMLANGUAGE */
47#endif /* ZEPHYR_INCLUDE_ARCH_TRICORE_ARCH_INLINES_H_ */
static ALWAYS_INLINE _cpu_t * arch_curr_cpu(void)
Definition arch_inlines.h:17
static ALWAYS_INLINE uint32_t arch_proc_id(void)
Definition arch_inlines.h:30
static ALWAYS_INLINE unsigned int arch_num_cpus(void)
Definition arch_inlines.h:39
TriCore Core Special Function Register (CSFR) addresses.
#define ALWAYS_INLINE
Definition common.h:186
__UINT32_TYPE__ uint32_t
Definition stdint.h:90