patch-2.4.25 linux-2.4.25/include/linux/list.h
Next file: linux-2.4.25/include/linux/lvm.h
Previous file: linux-2.4.25/include/linux/input.h
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
2004-02-18 05:36:32.000000000 -0800
- Orig file:
linux-2.4.24/include/linux/list.h
- Orig date:
2003-11-28 10:26:21.000000000 -0800
diff -urN linux-2.4.24/include/linux/list.h linux-2.4.25/include/linux/list.h
@@ -240,6 +240,20 @@
&pos->member != (head); \
pos = n, n = list_entry(n->member.next, typeof(*n), member))
+/**
+ * list_for_each_entry_continue - iterate over list of given type
+ * continuing after existing point
+ * @pos: the type * to use as a loop counter.
+ * @head: the head for your list.
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_for_each_entry_continue(pos, head, member) \
+ for (pos = list_entry(pos->member.next, typeof(*pos), member), \
+ prefetch(pos->member.next); \
+ &pos->member != (head); \
+ pos = list_entry(pos->member.next, typeof(*pos), member), \
+ prefetch(pos->member.next))
+
#endif /* __KERNEL__ || _LVM_H_INCLUDE */
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)