summaryrefslogtreecommitdiff
path: root/packages/linux/files/linux-2.4.18-list_move.patch
blob: faec56330bf1bc51b120ffdb64572cd9118f0e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- linux/include/linux/list.h~	2001-12-21 17:42:03.000000000 +0000
+++ linux/include/linux/list.h	2004-06-14 23:41:33.000000000 +0100
@@ -105,6 +105,29 @@
 }
 
 /**
+ * list_move - delete from one list and add as another's head
+ * @list: the entry to move
+ * @head: the head that will precede our entry
+ */
+static inline void list_move(struct list_head *list, struct list_head *head)
+{
+        __list_del(list->prev, list->next);
+        list_add(list, head);
+}
+
+/**
+ * list_move_tail - delete from one list and add as another's tail
+ * @list: the entry to move
+ * @head: the head that will follow our entry
+ */
+static inline void list_move_tail(struct list_head *list,
+				  struct list_head *head)
+{
+        __list_del(list->prev, list->next);
+        list_add_tail(list, head);
+}
+
+/**
  * list_empty - tests whether a list is empty
  * @head: the list to test.
  */