aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/arch/x86/odp/api/abi/cpu.h
blob: 523fa99e582774d3a444e874f9c5c561a1e79e16 (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
/* 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)
{
#ifdef __SSE2__
	__asm__ __volatile__ ("pause");
#else
	__asm__ __volatile__ ("rep; nop");
#endif
}

#ifdef __cplusplus
}
#endif

#endif