From 65f1e63457777f07170bde29241f483ebfc2d717 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 29 Jun 2011 14:20:31 -0400 Subject: [PATCH] non-linux system membarrier fallback update Signed-off-by: Mathieu Desnoyers --- urcu/static/urcu.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h index f2293bc..0295a3e 100644 --- a/urcu/static/urcu.h +++ b/urcu/static/urcu.h @@ -45,13 +45,18 @@ extern "C" { #endif -/* Default is RCU_MEMBARRIER on linux */ +/* Default is RCU_MEMBARRIER */ #if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL) -# ifdef __linux__ -# define RCU_MEMBARRIER -# else -# define RCU_MB -# endif +#define RCU_MEMBARRIER +#endif + +/* + * RCU_MEMBARRIER is only possibly available on Linux. Fallback to RCU_MB + * otherwise. + */ +#if !defined(__linux__) && defined(RCU_MEMBARRIER) +#undef RCU_MEMBARRIER +#define RCU_MB #endif #ifdef RCU_MEMBARRIER -- 2.34.1