summaryrefslogtreecommitdiffstats
path: root/src/kernel/tests/include/lapi/membarrier.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tests/include/lapi/membarrier.h')
-rw-r--r--src/kernel/tests/include/lapi/membarrier.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/kernel/tests/include/lapi/membarrier.h b/src/kernel/tests/include/lapi/membarrier.h
new file mode 100644
index 0000000..2b6c57f
--- /dev/null
+++ b/src/kernel/tests/include/lapi/membarrier.h
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2018 Linaro Limited. All rights reserved.
+ * Author: Rafael David Tinoco <rafael.tinoco@linaro.org>
+ */
+
+#ifndef LAPI_MEMBARRIER_H
+#define LAPI_MEMBARRIER_H
+
+/*
+ * Having <linux/membarrier.h> is enough to know if the test should run or
+ * not, but it might not define all needed MEMBARRIER_CMD_* being tested,
+ * since its first versions included just a few commands.
+ */
+
+enum membarrier_cmd {
+ MEMBARRIER_CMD_QUERY = 0,
+ MEMBARRIER_CMD_GLOBAL = (1 << 0),
+ MEMBARRIER_CMD_GLOBAL_EXPEDITED = (1 << 1),
+ MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = (1 << 2),
+ MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3),
+ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4),
+ MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 5),
+ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6),
+
+ /* Alias for header backward compatibility. */
+ MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL,
+};
+
+#endif