X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Furcu.h;h=5ba3004ddb17ccef50f69be9925ed8181923d65b;hb=4906d39806200a81e2f66ef5380974890c4e00c6;hp=289827248c8405aa41918b6b7619dc80f0bd7489;hpb=a2e7bf9ce5de5113c7f59c380b0087e291cd603d;p=urcu.git diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h index 2898272..5ba3004 100644 --- a/urcu/static/urcu.h +++ b/urcu/static/urcu.h @@ -31,28 +31,31 @@ #include #include -#include #include +#include #include #include #include #include #include -#include +#include #ifdef __cplusplus 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.