list.h: add list_move
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 29 Sep 2009 02:20:03 +0000 (22:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 29 Sep 2009 02:20:03 +0000 (22:20 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu/list.h

index 82c2ea4b9375855313c5b6cfaa5922415dfdeaea..6384728bc054d551fccd811cec27f43dc41d61da 100644 (file)
@@ -80,6 +80,13 @@ list_del (list_t *elem)
   __list_del (elem->prev, elem->next);
 }
 
+/* delete from list, add to another list as head */
+static inline void
+list_move (list_t *elem, list_t *head)
+{
+  __list_del (elem->prev, elem->next);
+  list_add (elem, head);
+}
 
 /* Join two lists.  */
 static inline void
This page took 0.027364 seconds and 4 git commands to generate.