aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/arch/x86/odp/api/cpu_arch.h
blob: 44e6b30ed6ea829acf0563b3e8f032a9dab39a9a (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, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier:     BSD-3-Clause
 */

#ifndef ODP_PLAT_CPU_ARCH_H_
#define ODP_PLAT_CPU_ARCH_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