From d50c483026a23b1ba20aa4e274ff8fa853360a6b Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 9 Aug 2005 20:15:51 -0700 Subject: [PATCH] --- yaml --- r: 6288 b: refs/heads/master c: 74459dc7bacda04d14626d239c8f5c4dac22560d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/list.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 956bc7eb452e..3809ebee53ef 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 95b81ef794278c835b321f6376b0522cd5df59b7 +refs/heads/master: 74459dc7bacda04d14626d239c8f5c4dac22560d diff --git a/trunk/include/linux/list.h b/trunk/include/linux/list.h index aab2db21b013..597094e0fdb5 100644 --- a/trunk/include/linux/list.h +++ b/trunk/include/linux/list.h @@ -418,6 +418,19 @@ static inline void list_splice_init(struct list_head *list, &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) +/** + * list_for_each_entry_safe_continue - iterate over list of given type + * continuing after existing point safe against removal of list entry + * @pos: the type * to use as a loop counter. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry_safe_continue(pos, n, head, member) \ + for (pos = n, n = list_entry(n->member.next, typeof(*n), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + /** * list_for_each_rcu - iterate over an rcu-protected list * @pos: the &struct list_head to use as a loop counter.