blob: 97a2861c5f4bedf61cffffaf1b96aeccd4b52a4f (
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
33
34
|
/* 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
#include <odp/autoheader_external.h>
#ifndef ODP_CACHE_LINE_SIZE
#define ODP_CACHE_LINE_SIZE _ODP_CACHE_LINE_SIZE
#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");
}
#ifdef __cplusplus
}
#endif
#endif
|