aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
blob: 16e47ce22f1a8054b18be1b00470cd35f4f42d64 (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
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2017 Cavium, Inc
 */

#ifndef _RTE_PAUSE_PPC64_H_
#define _RTE_PAUSE_PPC64_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "rte_atomic.h"

#include "generic/rte_pause.h"

static inline void rte_pause(void)
{
	/* Set hardware multi-threading low priority */
	asm volatile("or 1,1,1");
	/* Set hardware multi-threading medium priority */
	asm volatile("or 2,2,2");
	rte_compiler_barrier();
}

#ifdef __cplusplus
}
#endif

#endif /* _RTE_PAUSE_PPC64_H_ */