Lines Matching refs:head

97 #define	LIST_INIT(head) {						\  argument
98 (head)->lh_first = NULL; \
109 #define LIST_INSERT_HEAD(head, elm, field) { \ argument
110 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
111 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
112 (head)->lh_first = (elm); \
113 (elm)->field.le_prev = &(head)->lh_first; \
141 #define TAILQ_INIT(head) { \ argument
142 (head)->tqh_first = NULL; \
143 (head)->tqh_last = &(head)->tqh_first; \
146 #define TAILQ_INSERT_HEAD(head, elm, field) { \ argument
147 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
151 (head)->tqh_last = &(elm)->field.tqe_next; \
152 (head)->tqh_first = (elm); \
153 (elm)->field.tqe_prev = &(head)->tqh_first; \
156 #define TAILQ_INSERT_TAIL(head, elm, field) { \ argument
158 (elm)->field.tqe_prev = (head)->tqh_last; \
159 *(head)->tqh_last = (elm); \
160 (head)->tqh_last = &(elm)->field.tqe_next; \
163 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \ argument
168 (head)->tqh_last = &(elm)->field.tqe_next; \
173 #define TAILQ_REMOVE(head, elm, field) { \ argument
178 (head)->tqh_last = (elm)->field.tqe_prev; \
200 #define CIRCLEQ_INIT(head) { \ argument
201 (head)->cqh_first = (void *)(head); \
202 (head)->cqh_last = (void *)(head); \
205 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \ argument
208 if ((listelm)->field.cqe_next == (void *)(head)) \
209 (head)->cqh_last = (elm); \
215 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \ argument
218 if ((listelm)->field.cqe_prev == (void *)(head)) \
219 (head)->cqh_first = (elm); \
225 #define CIRCLEQ_INSERT_HEAD(head, elm, field) { \ argument
226 (elm)->field.cqe_next = (head)->cqh_first; \
227 (elm)->field.cqe_prev = (void *)(head); \
228 if ((head)->cqh_last == (void *)(head)) \
229 (head)->cqh_last = (elm); \
231 (head)->cqh_first->field.cqe_prev = (elm); \
232 (head)->cqh_first = (elm); \
235 #define CIRCLEQ_INSERT_TAIL(head, elm, field) { \ argument
236 (elm)->field.cqe_next = (void *)(head); \
237 (elm)->field.cqe_prev = (head)->cqh_last; \
238 if ((head)->cqh_first == (void *)(head)) \
239 (head)->cqh_first = (elm); \
241 (head)->cqh_last->field.cqe_next = (elm); \
242 (head)->cqh_last = (elm); \
245 #define CIRCLEQ_REMOVE(head, elm, field) { \ argument
246 if ((elm)->field.cqe_next == (void *)(head)) \
247 (head)->cqh_last = (elm)->field.cqe_prev; \
251 if ((elm)->field.cqe_prev == (void *)(head)) \
252 (head)->cqh_first = (elm)->field.cqe_next; \