summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f0f7dbd)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+#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
/*
* 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)
{
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)
}
static inline void _rcu_read_unlock(void)
/*
* Global grace period counter.
*/
/*
* 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
/*
* 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(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();
wait_for_quiescent_state();
internal_urcu_unlock();