Merge branch 'next/isa' into topic/misc
[cascardo/linux.git] / include / linux / rculist.h
index 5710f43..1bf0f70 100644 (file)
@@ -261,6 +261,20 @@ static inline void list_splice_init_rcu(struct list_head *list,
                prefetch((pos)->next), (pos) != (head); \
                (pos) = rcu_dereference((pos)->next))
 
+/**
+ * list_for_each_entry_continue_rcu - continue iteration over list of given type
+ * @pos:       the type * to use as a loop cursor.
+ * @head:      the head for your list.
+ * @member:    the name of the list_struct within the struct.
+ *
+ * Continue to iterate over list of given type, continuing after
+ * the current position.
+ */
+#define list_for_each_entry_continue_rcu(pos, head, member)            \
+       for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
+            prefetch(pos->member.next), &pos->member != (head);        \
+            pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
+
 /**
  * hlist_del_rcu - deletes entry from hash list without re-initialization
  * @n: the element to delete from the hash list.