Lines Matching refs:head

89 #define	LIST_FIRST(head)		((head)->lh_first)  argument
91 #define LIST_END(head) NULL argument
96 #define LIST_INIT(head) { \ argument
97 (head)->lh_first = NULL; \
115 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
116 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
117 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
118 (head)->lh_first = (elm); \
119 (elm)->field.le_prev = &(head)->lh_first; \
144 #define TAILQ_FIRST(head) ((head)->tqh_first) argument
146 #define TAILQ_END(head) NULL argument
151 #define TAILQ_INIT(head) do { \ argument
152 (head)->tqh_first = NULL; \
153 (head)->tqh_last = &(head)->tqh_first; \
156 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
157 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
158 (head)->tqh_first->field.tqe_prev = \
161 (head)->tqh_last = &(elm)->field.tqe_next; \
162 (head)->tqh_first = (elm); \
163 (elm)->field.tqe_prev = &(head)->tqh_first; \
166 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
168 (elm)->field.tqe_prev = (head)->tqh_last; \
169 *(head)->tqh_last = (elm); \
170 (head)->tqh_last = &(elm)->field.tqe_next; \
173 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
178 (head)->tqh_last = &(elm)->field.tqe_next; \
190 #define TAILQ_REMOVE(head, elm, field) do { \ argument
195 (head)->tqh_last = (elm)->field.tqe_prev; \
214 #define CIRCLEQ_FIRST(head) ((head)->cqh_first) argument
215 #define CIRCLEQ_LAST(head) ((head)->cqh_last) argument
216 #define CIRCLEQ_END(head) ((void *)(head)) argument
223 #define CIRCLEQ_INIT(head) do { \ argument
224 (head)->cqh_first = (void *)(head); \
225 (head)->cqh_last = (void *)(head); \
228 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
231 if ((listelm)->field.cqe_next == (void *)(head)) \
232 (head)->cqh_last = (elm); \
238 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
241 if ((listelm)->field.cqe_prev == (void *)(head)) \
242 (head)->cqh_first = (elm); \
248 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
249 (elm)->field.cqe_next = (head)->cqh_first; \
250 (elm)->field.cqe_prev = (void *)(head); \
251 if ((head)->cqh_last == (void *)(head)) \
252 (head)->cqh_last = (elm); \
254 (head)->cqh_first->field.cqe_prev = (elm); \
255 (head)->cqh_first = (elm); \
258 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
259 (elm)->field.cqe_next = (void *)(head); \
260 (elm)->field.cqe_prev = (head)->cqh_last; \
261 if ((head)->cqh_first == (void *)(head)) \
262 (head)->cqh_first = (elm); \
264 (head)->cqh_last->field.cqe_next = (elm); \
265 (head)->cqh_last = (elm); \
268 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
269 if ((elm)->field.cqe_next == (void *)(head)) \
270 (head)->cqh_last = (elm)->field.cqe_prev; \
274 if ((elm)->field.cqe_prev == (void *)(head)) \
275 (head)->cqh_first = (elm)->field.cqe_next; \