[PATCH][2.5] introduce list_move macros

From: Lightweight patch manager (patch@luckynet.dynu.com)
Date: Sun Jun 09 2002 - 06:09:54 EST


This is the only _global_ patch about the list_move macros, which means
introducing them. Here they are:

--- linus-2.5/include/linux/list.h Sun Jun 9 04:17:14 2002
+++ thunder-2.5/include/linux/list.h Sun Jun 9 05:07:02 2002
@@ -174,6 +174,24 @@
         for (pos = (head)->next, n = pos->next; pos != (head); \
                 pos = n, n = pos->next)
 
+/**
+ * list_move - move a list entry from a right after b
+ * @list the entry to move
+ * @head the entry to move after
+ */
+#define list_move(list,head) \
+ list_del(list); \
+ list_add(list,head)
+
+/**
+ * list_move_tail - move a list entry from a right before b
+ * @list the entry to move
+ * @head the entry that will come after ours
+ */
+#define list_move(list,head) \
+ list_del(list); \
+ list_add_tail(list,head)
+
 #endif /* __KERNEL__ || _LVM_H_INCLUDE */
 
 #endif

-- 
Lightweight patch manager using pine. If you have any objections, tell me.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:14 EST