Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
smp_mb();
}
+#define RCU_GP_ONLINE (1UL << 0)
+#define RCU_GP_COUNT (1UL << 1)
+
/*
* Global quiescent period counter with low-order bits unused.
* Using a int rather than a char to eliminate false register dependencies
static inline void _rcu_read_lock(void)
{
- rcu_assert(rcu_reader_qs_gp & 1);
+ rcu_assert(rcu_reader_qs_gp);
}
static inline void _rcu_read_unlock(void)
/*
* Global grace period counter.
*/
-unsigned long urcu_gp_ctr = 1;
+unsigned long urcu_gp_ctr = RCU_GP_ONLINE;
/*
* Written to only by each individual reader. Read by both the reader and the
STORE_SHARED(rcu_reader_qs_gp, 0);
internal_urcu_lock();
- STORE_SHARED(urcu_gp_ctr, urcu_gp_ctr + 2);
+ STORE_SHARED(urcu_gp_ctr, urcu_gp_ctr + RCU_GP_COUNT);
wait_for_quiescent_state();
internal_urcu_unlock();