X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Furcu-bp.h;h=8d221637a2756890d718faf55d7ca0a5a4a5ac23;hb=cc6b0c208a9707f8a64609a51167290caeace288;hp=64c32ea1ace5f14228e760f48383a47c03b8862d;hpb=9d2614f07691a813a3c560a6c0bcd0a7be854ed5;p=urcu.git diff --git a/urcu/static/urcu-bp.h b/urcu/static/urcu-bp.h index 64c32ea..8d22163 100644 --- a/urcu/static/urcu-bp.h +++ b/urcu/static/urcu-bp.h @@ -51,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 @@ -171,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 */ @@ -180,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