blob: 0ab5b8e141ae71139800434c7e386b8783287a7a (
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
|
/* Copyright (c) 2016-2018, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef ODP_API_ABI_CPU_H_
#define ODP_API_ABI_CPU_H_
#ifdef __cplusplus
extern "C" {
#endif
#define ODP_CACHE_LINE_SIZE 64
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");
}
#ifdef __cplusplus
}
#endif
#endif
|