patch-2.4.17 linux/include/linux/list.h
Next file: linux/include/linux/mm.h
Previous file: linux/include/linux/jbd.h
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Fri Dec 21 16:40:33 2001
- Orig file:
linux-2.4.16/include/linux/list.h
- Orig date:
Thu Nov 22 19:46:19 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/include/linux/list.h linux/include/linux/list.h
@@ -162,6 +162,16 @@
for (pos = (head)->next, n = pos->next; pos != (head); \
pos = n, n = pos->next)
+/**
+ * list_for_each_prev - iterate over a list in reverse order
+ * @pos: the &struct list_head to use as a loop counter.
+ * @head: the head for your list.
+ */
+#define list_for_each_prev(pos, head) \
+ for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
+ pos = pos->prev, prefetch(pos->prev))
+
+
#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)