Lines Matching refs:head
16 #define LIST_HEAD_INIT(head) \ argument
18 (head) = NULL; \
30 #define LIST_PREPEND(name,head,item) \ argument
32 typeof(*(head)) **_head = &(head), *_item = (item); \
41 #define LIST_APPEND(name,head,item) \ argument
43 typeof(*(head)) **_hhead = &(head), *_tail; \
49 #define LIST_REMOVE(name,head,item) \ argument
51 typeof(*(head)) **_head = &(head), *_item = (item); \
65 #define LIST_FIND_HEAD(name,item,head) \ argument
69 (head) = NULL; \
73 (head) = _item; \
91 #define LIST_INSERT_AFTER(name,head,a,b) \ argument
93 typeof(*(head)) **_head = &(head), *_a = (a), *_b = (b); \
109 #define LIST_INSERT_BEFORE(name,head,a,b) \ argument
111 typeof(*(head)) **_head = &(head), *_a = (a), *_b = (b); \
119 typeof(*(head)) *_tail = (head); \
142 #define LIST_FOREACH_WITH_NEXT(name,i,n,head) \ argument
143 for (typeof(*(head)) *n, *i = (head); i && (n = i->name##_next, true); i = n)
145 #define LIST_FOREACH(name,i,head) \ argument
146 LIST_FOREACH_WITH_NEXT(name, i, UNIQ_T(n, UNIQ), head)
168 #define LIST_LOOP_BUT_ONE(name,i,head,p) \ argument
169 for (typeof(*(p)) *i = (p)->name##_next ? (p)->name##_next : (head); \
171 i = i->name##_next ? i->name##_next : (head))
173 #define LIST_IS_EMPTY(head) \ argument
174 (!(head))