X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Furcu.h;h=5ba3004ddb17ccef50f69be9925ed8181923d65b;hb=4906d39806200a81e2f66ef5380974890c4e00c6;hp=3161a40088836c92a65edbdc8445385913afe0bb;hpb=4184999668035993577cb9ae24feac4eb4505a1e;p=urcu.git diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h index 3161a40..5ba3004 100644 --- a/urcu/static/urcu.h +++ b/urcu/static/urcu.h @@ -31,8 +31,8 @@ #include #include -#include #include +#include #include #include @@ -45,14 +45,17 @@ extern "C" { #endif -/* Default is RCU_MEMBARRIER */ +/* Default is RCU_MEMBARRIER on linux */ #if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL) -#define RCU_MEMBARRIER +# ifdef __linux__ +# define RCU_MEMBARRIER +# else +# define RCU_MB +# endif #endif #ifdef RCU_MEMBARRIER -#include -#include +#include /* If the headers do not support SYS_membarrier, statically use RCU_MB */ #ifdef SYS_membarrier @@ -228,7 +231,7 @@ struct rcu_reader { extern struct rcu_reader __thread rcu_reader; -extern int gp_futex; +extern int32_t gp_futex; /* * Wake-up waiting synchronize_rcu(). Called from many concurrent threads.