aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/list.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:15:51 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:50:04 -0400
commit74459dc7bacda04d14626d239c8f5c4dac22560d (patch)
tree7e24efa82b69765490c778ed5a7068b3b7613344 /include/linux/list.h
parent95b81ef794278c835b321f6376b0522cd5df59b7 (diff)
[LIST]: Introduce list_for_each_entry_safe_continue
Used in the dccp CCID3 code, that is going to be submitted RSN. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index aab2db21b013..597094e0fdb5 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -419,6 +419,19 @@ static inline void list_splice_init(struct list_head *list,
419 pos = n, n = list_entry(n->member.next, typeof(*n), member)) 419 pos = n, n = list_entry(n->member.next, typeof(*n), member))
420 420
421/** 421/**
422 * list_for_each_entry_safe_continue - iterate over list of given type
423 * continuing after existing point safe against removal of list entry
424 * @pos: the type * to use as a loop counter.
425 * @n: another type * to use as temporary storage
426 * @head: the head for your list.
427 * @member: the name of the list_struct within the struct.
428 */
429#define list_for_each_entry_safe_continue(pos, n, head, member) \
430 for (pos = n, n = list_entry(n->member.next, typeof(*n), member); \
431 &pos->member != (head); \
432 pos = n, n = list_entry(n->member.next, typeof(*n), member))
433
434/**
422 * list_for_each_rcu - iterate over an rcu-protected list 435 * list_for_each_rcu - iterate over an rcu-protected list
423 * @pos: the &struct list_head to use as a loop counter. 436 * @pos: the &struct list_head to use as a loop counter.
424 * @head: the head for your list. 437 * @head: the head for your list.