On Mon, 2008-01-21 at 13:52 +0100, Andrea Arcangeli wrote:
spinlock_t lock;
I think we can get rid of this rwlock as I think this will seriously
hurt larger machines.
rcu_read_lock();
hlist_for_each_entry_rcu
rcu_read_unlock();
rcu_read_lock();
hlist_for_each_entry_safe_rcu
hlist_del_rcu
rcu_read_unlock();
spin_lock
hlist_add_head_rcu
spin_unlock
spin_lock
hlist_del_rcu
spin_unlock
#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
for (pos = (head)->first; \
rcu_dereference(pos) && ({ n = pos->next; 1; }) && \
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
pos = n)
--