]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/rculist.h
IPv6: convert addrconf hash list to RCU
[net-next-2.6.git] / include / linux / rculist.h
index 2c9b46cff3d70bc61f4f1273897b47a694a94796..004908b104d597999a86069388b01df309fe8ade 100644 (file)
@@ -428,5 +428,18 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
                ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \
                pos = rcu_dereference_raw(pos->next))
 
+/**
+ * hlist_for_each_entry_continue_rcu - iterate over a hlist continuing after current point
+ * @tpos:      the type * to use as a loop cursor.
+ * @pos:       the &struct hlist_node to use as a loop cursor.
+ * @member:    the name of the hlist_node within the struct.
+ */
+#define hlist_for_each_entry_continue_rcu(tpos, pos, member)           \
+       for (pos = rcu_dereference((pos)->next);                        \
+            pos && ({ prefetch(pos->next); 1; }) &&                    \
+            ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });  \
+            pos = rcu_dereference(pos->next))
+
+
 #endif /* __KERNEL__ */
 #endif