Zephyr Project API
3.2.0
A Scalable Open Source RTOS
arch_inlines.h
Go to the documentation of this file.
1
/*
2
* Copyright 2022 IoT.bzh
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_ARCH_INLINES_H
8
#define ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_ARCH_INLINES_H
9
10
#include <
zephyr/kernel_structs.h
>
11
12
#ifndef CONFIG_SMP
13
static
ALWAYS_INLINE
_cpu_t *
arch_curr_cpu
(
void
)
14
{
15
/* Dummy implementation always return the first cpu */
16
return
&_kernel.cpus[0];
17
}
18
#endif
19
20
static
ALWAYS_INLINE
uint32_t
arch_proc_id
(
void
)
21
{
22
/*
23
* Placeholder implementation to be replaced with an architecture
24
* specific call to get processor ID
25
*/
26
return
arch_curr_cpu
()->id;
27
}
28
29
#endif
/* ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_ARCH_INLINES_H */
arch_curr_cpu
static ALWAYS_INLINE _cpu_t * arch_curr_cpu(void)
Definition:
arch_inlines.h:17
arch_proc_id
static ALWAYS_INLINE uint32_t arch_proc_id(void)
Definition:
arch_inlines.h:20
ALWAYS_INLINE
#define ALWAYS_INLINE
Definition:
common.h:124
kernel_structs.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:90
include
zephyr
arch
arm
aarch32
arch_inlines.h
Generated on Tue Feb 28 2023 15:43:18 for Zephyr Project API by
1.9.2