Update support for MEMBARRIER_QUERY
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 14 Jan 2010 01:52:52 +0000 (20:52 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 14 Jan 2010 01:52:52 +0000 (20:52 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu-static.h
urcu.c

index 44bcd073710e3e98d760c667eb7aa787238bb3ff..e1d0704d1af54cad91ca5c0295f00d92a9cabece 100644 (file)
@@ -56,8 +56,9 @@ extern "C" {
 
 /* 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
diff --git a/urcu.c b/urcu.c
index b8e8b422a5941adab6999979736317a29e2d51f9..7b75d4c545da73765d78fa168d628d3d4513e9f5 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -392,7 +392,7 @@ void rcu_init(void)
        if (init_done)
                return;
        init_done = 1;
-       if (!membarrier(MEMBARRIER_EXPEDITED))
+       if (!membarrier(MEMBARRIER_EXPEDITED | MEMBARRIER_QUERY))
                has_sys_membarrier = 1;
 }
 #endif
This page took 0.026049 seconds and 4 git commands to generate.