int wait_loops = 0;
struct rcu_reader *index, *tmp;
- /* Switch parity: 1 -> 0, 0 -> 1 */
+ /* Switch parity: 0 -> 1, 1 -> 0 */
STORE_SHARED(rcu_gp_ctr, rcu_gp_ctr ^ RCU_GP_CTR_PHASE);
/*
assert(ret != EINVAL);
if (ret == ESRCH) {
list_del(&rcu_reader_reg->head);
+ rcu_reader_reg->ctr = 0;
rcu_reader_reg->alloc = 0;
registry_arena.used -= sizeof(struct rcu_reader);
}