Lines Matching refs:field
107 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
108 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
109 (listelm)->field.le_next->field.le_prev = \
110 &(elm)->field.le_next; \
111 (listelm)->field.le_next = (elm); \
112 (elm)->field.le_prev = &(listelm)->field.le_next; \
115 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
116 (elm)->field.le_prev = (listelm)->field.le_prev; \
117 (elm)->field.le_next = (listelm); \
118 *(listelm)->field.le_prev = (elm); \
119 (listelm)->field.le_prev = &(elm)->field.le_next; \
122 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
123 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
124 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
126 (elm)->field.le_prev = &(head)->lh_first; \
129 #define LIST_REMOVE(elm, field) do { \ argument
130 if ((elm)->field.le_next != NULL) \
131 (elm)->field.le_next->field.le_prev = \
132 (elm)->field.le_prev; \
133 *(elm)->field.le_prev = (elm)->field.le_next; \
136 #define LIST_FOREACH(var, head, field) \ argument
139 (var) = ((var)->field.le_next))
146 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
172 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
173 (elm)->field.sle_next = (slistelm)->field.sle_next; \
174 (slistelm)->field.sle_next = (elm); \
177 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
178 (elm)->field.sle_next = (head)->slh_first; \
182 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
183 (head)->slh_first = (head)->slh_first->field.sle_next; \
186 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
188 SLIST_REMOVE_HEAD((head), field); \
192 while(curelm->field.sle_next != (elm)) \
193 curelm = curelm->field.sle_next; \
194 curelm->field.sle_next = \
195 curelm->field.sle_next->field.sle_next; \
199 #define SLIST_FOREACH(var, head, field) \ argument
200 for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
207 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) argument
235 #define STAILQ_INSERT_HEAD(head, elm, field) do { \ argument
236 if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
237 (head)->stqh_last = &(elm)->field.stqe_next; \
241 #define STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
242 (elm)->field.stqe_next = NULL; \
244 (head)->stqh_last = &(elm)->field.stqe_next; \
247 #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
248 if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
249 (head)->stqh_last = &(elm)->field.stqe_next; \
250 (listelm)->field.stqe_next = (elm); \
253 #define STAILQ_REMOVE_HEAD(head, field) do { \ argument
254 if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
258 #define STAILQ_REMOVE(head, elm, type, field) do { \ argument
260 STAILQ_REMOVE_HEAD((head), field); \
263 while (curelm->field.stqe_next != (elm)) \
264 curelm = curelm->field.stqe_next; \
265 if ((curelm->field.stqe_next = \
266 curelm->field.stqe_next->field.stqe_next) == NULL) \
267 (head)->stqh_last = &(curelm)->field.stqe_next; \
271 #define STAILQ_FOREACH(var, head, field) \ argument
274 (var) = ((var)->field.stqe_next))
281 #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) argument
309 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
310 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
311 (head)->sqh_last = &(elm)->field.sqe_next; \
315 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
316 (elm)->field.sqe_next = NULL; \
318 (head)->sqh_last = &(elm)->field.sqe_next; \
321 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
322 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
323 (head)->sqh_last = &(elm)->field.sqe_next; \
324 (listelm)->field.sqe_next = (elm); \
327 #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ argument
328 if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
332 #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ argument
334 SIMPLEQ_REMOVE_HEAD((head), field); \
337 while (curelm->field.sqe_next != (elm)) \
338 curelm = curelm->field.sqe_next; \
339 if ((curelm->field.sqe_next = \
340 curelm->field.sqe_next->field.sqe_next) == NULL) \
341 (head)->sqh_last = &(curelm)->field.sqe_next; \
345 #define SIMPLEQ_FOREACH(var, head, field) \ argument
348 (var) = ((var)->field.sqe_next))
355 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
386 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
387 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
388 (head)->tqh_first->field.tqe_prev = \
389 &(elm)->field.tqe_next; \
391 (head)->tqh_last = &(elm)->field.tqe_next; \
393 (elm)->field.tqe_prev = &(head)->tqh_first; \
396 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
397 (elm)->field.tqe_next = NULL; \
398 (elm)->field.tqe_prev = (head)->tqh_last; \
400 (head)->tqh_last = &(elm)->field.tqe_next; \
403 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
404 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
405 (elm)->field.tqe_next->field.tqe_prev = \
406 &(elm)->field.tqe_next; \
408 (head)->tqh_last = &(elm)->field.tqe_next; \
409 (listelm)->field.tqe_next = (elm); \
410 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
413 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
414 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
415 (elm)->field.tqe_next = (listelm); \
416 *(listelm)->field.tqe_prev = (elm); \
417 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
420 #define TAILQ_REMOVE(head, elm, field) do { \ argument
421 if (((elm)->field.tqe_next) != NULL) \
422 (elm)->field.tqe_next->field.tqe_prev = \
423 (elm)->field.tqe_prev; \
425 (head)->tqh_last = (elm)->field.tqe_prev; \
426 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
429 #define TAILQ_FOREACH(var, head, field) \ argument
432 (var) = ((var)->field.tqe_next))
434 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
437 (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
444 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
448 #define TAILQ_PREV(elm, headname, field) \ argument
449 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
478 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
479 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
480 (elm)->field.cqe_prev = (listelm); \
481 if ((listelm)->field.cqe_next == (void *)(head)) \
484 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
485 (listelm)->field.cqe_next = (elm); \
488 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
489 (elm)->field.cqe_next = (listelm); \
490 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
491 if ((listelm)->field.cqe_prev == (void *)(head)) \
494 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
495 (listelm)->field.cqe_prev = (elm); \
498 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
499 (elm)->field.cqe_next = (head)->cqh_first; \
500 (elm)->field.cqe_prev = (void *)(head); \
504 (head)->cqh_first->field.cqe_prev = (elm); \
508 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
509 (elm)->field.cqe_next = (void *)(head); \
510 (elm)->field.cqe_prev = (head)->cqh_last; \
514 (head)->cqh_last->field.cqe_next = (elm); \
518 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
519 if ((elm)->field.cqe_next == (void *)(head)) \
520 (head)->cqh_last = (elm)->field.cqe_prev; \
522 (elm)->field.cqe_next->field.cqe_prev = \
523 (elm)->field.cqe_prev; \
524 if ((elm)->field.cqe_prev == (void *)(head)) \
525 (head)->cqh_first = (elm)->field.cqe_next; \
527 (elm)->field.cqe_prev->field.cqe_next = \
528 (elm)->field.cqe_next; \
531 #define CIRCLEQ_FOREACH(var, head, field) \ argument
534 (var) = ((var)->field.cqe_next))
536 #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ argument
539 (var) = ((var)->field.cqe_prev))
547 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
548 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
550 #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ argument
551 (((elm)->field.cqe_next == (void *)(head)) \
553 : (elm->field.cqe_next))
554 #define CIRCLEQ_LOOP_PREV(head, elm, field) \ argument
555 (((elm)->field.cqe_prev == (void *)(head)) \
557 : (elm->field.cqe_prev))