X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Furcu-bp.h;h=8d221637a2756890d718faf55d7ca0a5a4a5ac23;hb=cc6b0c208a9707f8a64609a51167290caeace288;hp=cca8d6ac2bc40ae9e832d6475dfa6d89933e7d1d;hpb=a2e7bf9ce5de5113c7f59c380b0087e291cd603d;p=urcu.git diff --git a/urcu/static/urcu-bp.h b/urcu/static/urcu-bp.h index cca8d6a..8d22163 100644 --- a/urcu/static/urcu-bp.h +++ b/urcu/static/urcu-bp.h @@ -31,7 +31,6 @@ #include #include -#include #include #include @@ -52,11 +51,6 @@ extern "C" { #endif -/* - * Active attempts to check for reader Q.S. before calling sleep(). - */ -#define RCU_QS_ACTIVE_ATTEMPTS 100 - #ifdef DEBUG_RCU #define rcu_assert(args...) assert(args) #else @@ -172,7 +166,7 @@ static inline void _rcu_read_lock(void) long tmp; /* Check if registered */ - if (unlikely(!rcu_reader)) + if (caa_unlikely(!rcu_reader)) rcu_bp_register(); cmm_barrier(); /* Ensure the compiler does not reorder us with mutex */ @@ -181,7 +175,7 @@ static inline void _rcu_read_lock(void) * rcu_gp_ctr is * RCU_GP_COUNT | (~RCU_GP_CTR_PHASE or RCU_GP_CTR_PHASE) */ - if (likely(!(tmp & RCU_GP_CTR_NEST_MASK))) { + if (caa_likely(!(tmp & RCU_GP_CTR_NEST_MASK))) { _CMM_STORE_SHARED(rcu_reader->ctr, _CMM_LOAD_SHARED(rcu_gp_ctr)); /* * Set active readers count for outermost nesting level before