lkml.org 
[lkml]   [2002]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.5] introduce list_move macros (revisited)
This is the only _global_ patch about the list_move macros, which means 
introducing them. Here they are, revisited:

--- linus-2.5/include/linux/list.h Sun Jun 9 04:17:14 2002
+++ thunder-2.5/include/linux/list.h Sun Jun 9 06:40:14 2002
@@ -174,6 +174,26 @@
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) \
+ do { __list_del(list->prev, list->next); \
+ list_add(list,head); } \
+ while(0)
+
+/**
+ * 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_tail(list,head) \
+ do { __list_del(list->prev, list->next); \
+ list_add_tail(list,head); } \
+ while(0)
+
#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/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.069 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site