X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu-qsbr.c;h=a239be036d416f68259c0f586f5d0ce7248385e9;hb=408f6d9220576478e5ce9a20256d579fc9bfa954;hp=5eda71dbf3c1ee454f9b29e19c752ff946f7c9b3;hpb=af7c2dbeac32c663b64ad05e4eca70e18784463b;p=urcu.git diff --git a/urcu-qsbr.c b/urcu-qsbr.c index 5eda71d..a239be0 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -44,13 +45,18 @@ void __attribute__((destructor)) rcu_exit(void); static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER; -int gp_futex; +int32_t gp_futex; /* * Global grace period counter. */ unsigned long rcu_gp_ctr = RCU_GP_ONLINE; +/* + * Active attempts to check for reader Q.S. before calling futex(). + */ +#define RCU_QS_ACTIVE_ATTEMPTS 100 + /* * Written to only by each individual reader. Read by both the reader and the * writers.