X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu-qsbr.c;h=a239be036d416f68259c0f586f5d0ce7248385e9;hb=34b1b9db1cc283c556af5f35f70ea2e4713a440d;hp=cf8b5cec46d2c10afaff8c53a56e9adfa4e27eb1;hpb=0376e7b2f8d26778ebc4750b34e718c062c92764;p=urcu.git diff --git a/urcu-qsbr.c b/urcu-qsbr.c index cf8b5ce..a239be0 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -23,19 +23,21 @@ * IBM's contributions to this file may be relicensed under LGPLv2 or later. */ +#define _GNU_SOURCE #include #include #include #include #include +#include #include #include #include -#include "urcu-qsbr-map.h" +#include "urcu/map/urcu-qsbr.h" #define BUILD_QSBR_LIB -#include "urcu-qsbr-static.h" +#include "urcu/static/urcu-qsbr.h" /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ #include "urcu-qsbr.h" @@ -43,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.