blob: bf44806a05023ab883d2d1ee402a464a08d9d7f1 (
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
31
32
|
/* Copyright (c) 2016-2018, Linaro Limited
* Copyright (c) 2021, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#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
|