rcuja: free all leaf nodes at destruction
[urcu.git] / urcu / hlist.h
index 222a59ab854da278a5fbeb9d49b666206d7899a0..15e672bc1702135ddfdb20b5676785dbd3cb2f55 100644 (file)
@@ -39,6 +39,10 @@ static inline void  CDS_INIT_HLIST_HEAD(struct cds_hlist_head *ptr)
 #define cds_hlist_entry(ptr, type, member)                                     \
        ((type *) ((char *) (ptr) - (unsigned long) (&((type *) 0)->member)))
 
+/* Get first entry from a list. Assumes the hlist is not empty. */
+#define cds_hlist_first_entry(ptr, type, member) \
+       cds_list_entry((ptr)->next, type, member)
+
 static inline int cds_hlist_empty(struct cds_hlist_head *head)
 {
        return !head->next;
This page took 0.021868 seconds and 4 git commands to generate.