You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.2 KiB
60 lines
2.2 KiB
commit 73354cff1aae409d6ef7d8a539a2a0a09c2480f9 |
|
Author: Dmitry V. Levin <ldv@altlinux.org> |
|
Date: Wed Nov 1 00:20:44 2017 +0000 |
|
|
|
Update MEMBARRIER_CMD_* constants |
|
|
|
* xlat/membarrier_cmds.in: Add MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED |
|
introduced by kernel commit v4.14-rc6~26. |
|
* tests/membarrier.c (main): Update expected output. |
|
|
|
diff --git a/tests/membarrier.c b/tests/membarrier.c |
|
index 7d79724..75a8469 100644 |
|
--- a/tests/membarrier.c |
|
+++ b/tests/membarrier.c |
|
@@ -55,6 +55,11 @@ main(void) |
|
text = "MEMBARRIER_CMD_SHARED|" |
|
"MEMBARRIER_CMD_PRIVATE_EXPEDITED"; |
|
break; |
|
+ case 1|8|16: |
|
+ text = "MEMBARRIER_CMD_SHARED|" |
|
+ "MEMBARRIER_CMD_PRIVATE_EXPEDITED|" |
|
+ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED"; |
|
+ break; |
|
default: |
|
error_msg_and_fail("membarrier returned %#x, does" |
|
" the test have to be updated?", rc); |
|
diff --git a/xlat/membarrier_cmds.in b/xlat/membarrier_cmds.in |
|
index 3baef17..e4fe06a 100644 |
|
--- a/xlat/membarrier_cmds.in |
|
+++ b/xlat/membarrier_cmds.in |
|
@@ -1,3 +1,4 @@ |
|
MEMBARRIER_CMD_QUERY 0 |
|
MEMBARRIER_CMD_SHARED 1 |
|
MEMBARRIER_CMD_PRIVATE_EXPEDITED 8 |
|
+MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 16 |
|
diff -rup a/xlat/membarrier_cmds.h b/xlat/membarrier_cmds.h |
|
--- a/xlat/membarrier_cmds.h 2016-05-31 07:35:42.000000000 -0400 |
|
+++ b/xlat/membarrier_cmds.h 2018-02-05 19:44:34.045234830 -0500 |
|
@@ -5,6 +5,12 @@ |
|
#if !(defined(MEMBARRIER_CMD_SHARED) || (defined(HAVE_DECL_MEMBARRIER_CMD_SHARED) && HAVE_DECL_MEMBARRIER_CMD_SHARED)) |
|
# define MEMBARRIER_CMD_SHARED 1 |
|
#endif |
|
+#if !(defined(MEMBARRIER_CMD_PRIVATE_EXPEDITED) || (defined(HAVE_DECL_MEMBARRIER_CMD_PRIVATE_EXPEDITED) && HAVE_DECL_MEMBARRIER_CMD_PRIVATE_EXPEDITED)) |
|
+# define MEMBARRIER_CMD_PRIVATE_EXPEDITED 8 |
|
+#endif |
|
+#if !(defined(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED) || (defined(HAVE_DECL_MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED) && HAVE_DECL_MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED)) |
|
+# define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 16 |
|
+#endif |
|
|
|
#ifdef IN_MPERS |
|
|
|
@@ -16,6 +22,8 @@ static |
|
const struct xlat membarrier_cmds[] = { |
|
XLAT(MEMBARRIER_CMD_QUERY), |
|
XLAT(MEMBARRIER_CMD_SHARED), |
|
+ XLAT(MEMBARRIER_CMD_PRIVATE_EXPEDITED), |
|
+ XLAT(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED), |
|
XLAT_END |
|
}; |
|
|
|
|