Em Wed, Nov 19, 2008 at 10:46:24AM -0800, Paul E. McKenney escreveu:
For whatever it is worth, here is a more complete use case, on the
off-chance that it becomes useful some time:
retry:
rcu_read_lock();
retry: /* should be here, huh? */
hlist_nulls_for_each_entry_rcu(tpos, pos, head, hn_node) {
if (!(curgen = still_valid(tpos)))
goto retry;
if (needs_deletion(tpos)) {
spin_lock(&update_side_lock);
if (still_valid(tpos) == curgen)
hlist_nulls_del_init_rcu(pos);
spin_unlock(&update_side_lock);
}
}
rcu_read_unlock();
- Arnaldo