]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/list.h
x86: remove set_kernel_exec()
[linux-2.6-omap-h63xx.git] / include / linux / list.h
index ad9dcb9e337523337d5d2bacaa7c2e9f679f786a..75ce2cb4ff6ebc92a8fcaa557a9bd7b6b9b9b1b6 100644 (file)
@@ -477,6 +477,17 @@ static inline void list_splice_init_rcu(struct list_head *list,
        for (pos = (head)->next, n = pos->next; pos != (head); \
                pos = n, n = pos->next)
 
+/**
+ * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
+ * @pos:       the &struct list_head to use as a loop cursor.
+ * @n:         another &struct list_head to use as temporary storage
+ * @head:      the head for your list.
+ */
+#define list_for_each_prev_safe(pos, n, head) \
+       for (pos = (head)->prev, n = pos->prev; \
+            prefetch(pos->prev), pos != (head); \
+            pos = n, n = pos->prev)
+
 /**
  * list_for_each_entry -       iterate over list of given type
  * @pos:       the type * to use as a loop cursor.