Lines Matching refs:head
24 /* The head of the linked list. Use this in the structure that shall
25 * contain the head of the linked list */
33 /* Initialize the list's head */
34 #define LIST_HEAD_INIT(head) \
36 (head) = NULL; } \
48 #define LIST_PREPEND(name,head,item) \
50 typeof(*(head)) **_head = &(head), *_item = (item); \
59 #define LIST_REMOVE(name,head,item) \
61 typeof(*(head)) **_head = &(head), *_item = (item); \
74 /* Find the head of the list */
75 #define LIST_FIND_HEAD(name,item,head) \
79 (head) = NULL; \
83 (head) = _item; \
101 #define LIST_INSERT_AFTER(name,head,a,b) \
103 typeof(*(head)) **_head = &(head), *_a = (a), *_b = (b); \
121 #define LIST_FOREACH(name,i,head) \
122 for ((i) = (head); (i); (i) = (i)->name##_next)
124 #define LIST_FOREACH_SAFE(name,i,n,head) \
125 for ((i) = (head); (i) && (((n) = (i)->name##_next), 1); (i) = (n))
135 #define LIST_LOOP_BUT_ONE(name,i,head,p) \
136 for ((i) = (p)->name##_next ? (p)->name##_next : (head); \
138 (i) = (i)->name##_next ? (i)->name##_next : (head))