Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
/* If the headers do not support SYS_membarrier, statically use RCU_MB */
#ifdef SYS_membarrier
-# define MEMBARRIER_EXPEDITED (1 << 0)
-# define MEMBARRIER_DELAYED (1 << 1)
+# define MEMBARRIER_EXPEDITED (1 << 0)
+# define MEMBARRIER_DELAYED (1 << 1)
+# define MEMBARRIER_QUERY (1 << 16)
# define membarrier(...) syscall(__NR_membarrier, __VA_ARGS__)
#else
# undef RCU_MEMBARRIER
if (init_done)
return;
init_done = 1;
- if (!membarrier(MEMBARRIER_EXPEDITED))
+ if (!membarrier(MEMBARRIER_EXPEDITED | MEMBARRIER_QUERY))
has_sys_membarrier = 1;
}
#endif