From: Mathieu Desnoyers Date: Thu, 14 Jan 2010 01:52:52 +0000 (-0500) Subject: Update support for MEMBARRIER_QUERY X-Git-Tag: v0.4.0~7 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;ds=sidebyside;h=cf5271eed768bea133b1916eca1d1917920e3105;p=urcu.git Update support for MEMBARRIER_QUERY Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-static.h b/urcu-static.h index 44bcd07..e1d0704 100644 --- a/urcu-static.h +++ b/urcu-static.h @@ -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 b8e8b42..7b75d4c 100644 --- 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