summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2003-04-28 12:34:32 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-04-28 12:34:32 -0700
commit64e535eed284139c2f686cf891dd7f81af6305bf (patch)
treeeedc494a51e369e728296236ac6bbbf0479fbfe4 /include/linux
parent7242b16ab3437ad052bb4fa3cb867dc38eb17a34 (diff)
[NETFILTER]: Use Read Copy Update.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/list.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 9b8485930659..a724f9bcbe4d 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -335,6 +335,16 @@ static inline void list_splice_init(struct list_head *list,
prefetch(pos->member.next))
+/**
+ * list_for_each_continue_rcu - iterate over an rcu-protected list
+ * continuing from existing point.
+ * @pos: the &struct list_head to use as a loop counter.
+ * @head: the head for your list.
+ */
+#define list_for_each_continue_rcu(pos, head) \
+ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \
+ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next))
+
/*
* Double linked lists with a single pointer list head.
* Mostly useful for hash tables where the two pointer list head is