blob: 298953d958161c8c47e059d6ae4f6ad726603162 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2016-2018 Linaro Limited
* Copyright (c) 2021 Nokia
*/
#ifndef ODP_ARCH_CPU_INLINES_H_
#define ODP_ARCH_CPU_INLINES_H_
#ifdef __cplusplus
extern "C" {
#endif
static inline void _odp_cpu_pause(void)
{
/* YIELD hints the CPU to switch to another thread if possible
* and executes as a NOP otherwise.
* ISB flushes the pipeline, then restarts. This is guaranteed to
* stall the CPU a number of cycles.
*/
__asm volatile("isb" ::: "memory");
}
/* Use generic implementations for the rest of the functions */
#include <odp/api/abi/cpu_generic.h>
#ifdef __cplusplus
}
#endif
#endif
|