X-Git-Url: https://git.lttng.org/?p=userspace-rcu.git;a=blobdiff_plain;f=include%2Furcu%2Fstatic%2Furcu-bp.h;h=8ba3830b243d7e05bfddb84081a2db46f3a00beb;hp=8614d68ad33434b9b3fd81e041733ea5753698c2;hb=014775106c60f02818ca755b331f887030bd440f;hpb=4477a87021ffbfbfdb2a2084d05a084171343d36 diff --git a/include/urcu/static/urcu-bp.h b/include/urcu/static/urcu-bp.h index 8614d68..8ba3830 100644 --- a/include/urcu/static/urcu-bp.h +++ b/include/urcu/static/urcu-bp.h @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include /* * This code section can only be included in LGPL 2.1 compatible source code. @@ -169,7 +169,7 @@ static inline void _urcu_bp_read_lock(void) urcu_bp_register(); /* If not yet registered. */ cmm_barrier(); /* Ensure the compiler does not reorder us with mutex */ tmp = URCU_TLS(urcu_bp_reader)->ctr; - urcu_assert((tmp & URCU_BP_GP_CTR_NEST_MASK) != URCU_BP_GP_CTR_NEST_MASK); + urcu_assert_debug((tmp & URCU_BP_GP_CTR_NEST_MASK) != URCU_BP_GP_CTR_NEST_MASK); _urcu_bp_read_lock_update(tmp); } @@ -183,7 +183,7 @@ static inline void _urcu_bp_read_unlock(void) unsigned long tmp; tmp = URCU_TLS(urcu_bp_reader)->ctr; - urcu_assert(tmp & URCU_BP_GP_CTR_NEST_MASK); + urcu_assert_debug(tmp & URCU_BP_GP_CTR_NEST_MASK); /* Finish using rcu before decrementing the pointer. */ urcu_bp_smp_mb_slave(); _CMM_STORE_SHARED(URCU_TLS(urcu_bp_reader)->ctr, tmp - URCU_BP_GP_COUNT);