Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] [PATCH userspace-rcu] Add a cds_list_del_init()
@ 2011-06-08 23:29 Paul E. McKenney
  2011-06-08 23:31 ` Mathieu Desnoyers
  0 siblings, 1 reply; 2+ messages in thread
From: Paul E. McKenney @ 2011-06-08 23:29 UTC (permalink / raw)


Needed by some perfbook example code.

Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>

diff --git a/urcu/list.h b/urcu/list.h
index db7685f..ab7a470 100644
--- a/urcu/list.h
+++ b/urcu/list.h
@@ -80,6 +80,14 @@ cds_list_del (struct cds_list_head *elem)
   __cds_list_del (elem->prev, elem->next);
 }
 
+/* Remove element from list, initializing the element's list pointers. */
+static inline void
+cds_list_del_init (struct cds_list_head *elem)
+{
+	cds_list_del(elem);
+	CDS_INIT_LIST_HEAD(elem);
+}
+
 /* delete from list, add to another list as head */
 static inline void
 cds_list_move (struct cds_list_head *elem, struct cds_list_head *head)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-08 23:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08 23:29 [ltt-dev] [PATCH userspace-rcu] Add a cds_list_del_init() Paul E. McKenney
2011-06-08 23:31 ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox