xref: /third_party/ltp/include/lapi/membarrier.h (revision f08c3bdf)
1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
2f08c3bdfSopenharmony_ci/*
3f08c3bdfSopenharmony_ci * Copyright (c) 2018 Linaro Limited. All rights reserved.
4f08c3bdfSopenharmony_ci * Author: Rafael David Tinoco <rafael.tinoco@linaro.org>
5f08c3bdfSopenharmony_ci */
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ci#ifndef LAPI_MEMBARRIER_H__
8f08c3bdfSopenharmony_ci#define LAPI_MEMBARRIER_H__
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_ci/*
11f08c3bdfSopenharmony_ci * Having <linux/membarrier.h> is enough to know if the test should run or
12f08c3bdfSopenharmony_ci * not, but it might not define all needed MEMBARRIER_CMD_* being tested,
13f08c3bdfSopenharmony_ci * since its first versions included just a few commands.
14f08c3bdfSopenharmony_ci */
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_cienum membarrier_cmd {
17f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_QUERY					= 0,
18f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_GLOBAL					= (1 << 0),
19f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_GLOBAL_EXPEDITED				= (1 << 1),
20f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED		= (1 << 2),
21f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_PRIVATE_EXPEDITED			= (1 << 3),
22f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED		= (1 << 4),
23f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE		= (1 << 5),
24f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE	= (1 << 6),
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci	/* Alias for header backward compatibility. */
27f08c3bdfSopenharmony_ci	MEMBARRIER_CMD_SHARED			= MEMBARRIER_CMD_GLOBAL,
28f08c3bdfSopenharmony_ci};
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci#endif /* LAPI_MEMBARRIER_H__ */
31