projects
/
librseq.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: membarrier flags for kernels headers < 5.10
[librseq.git]
/
tests
/
param_test.c
diff --git
a/tests/param_test.c
b/tests/param_test.c
index 68a34dc077157612ff2fdd5c878d4e99ff43e0f6..e71e92c82b1b39e00c720a618f98c7b1219cae53 100644
(file)
--- a/
tests/param_test.c
+++ b/
tests/param_test.c
@@
-3,6
+3,7
@@
#define _GNU_SOURCE
#endif
#include <assert.h>
#define _GNU_SOURCE
#endif
#include <assert.h>
+#include <linux/version.h>
#include <linux/membarrier.h>
#include <pthread.h>
#include <sched.h>
#include <linux/membarrier.h>
#include <pthread.h>
#include <sched.h>
@@
-18,6
+19,17
@@
#include <errno.h>
#include <stddef.h>
#include <errno.h>
#include <stddef.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
+enum {
+ MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = (1 << 7),
+ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = (1 << 8),
+};
+
+enum {
+ MEMBARRIER_CMD_FLAG_CPU = (1 << 0),
+};
+#endif
+
#define NR_INJECT 9
static int loop_cnt[NR_INJECT + 1];
#define NR_INJECT 9
static int loop_cnt[NR_INJECT + 1];
This page took
0.022202 seconds
and
4
git commands to generate.