Zephyr API Documentation 4.5.0-rc1
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
25static ALWAYS_INLINE uint32_t arch_proc_id(void)
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_ */
TriCore Core Special Function Register (CSFR) addresses.
static unsigned int arch_num_cpus(void)
Returns the number of CPUs.
static struct _cpu * arch_curr_cpu(void)
Return the CPU struct for the currently executing CPU.
static uint32_t arch_proc_id(void)
Processor hardware ID.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90