Lines Matching refs:field
105 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
106 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
107 (listelm)->field.le_next->field.le_prev = \
108 &(elm)->field.le_next; \
109 (listelm)->field.le_next = (elm); \
110 (elm)->field.le_prev = &(listelm)->field.le_next; \
113 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
114 (elm)->field.le_prev = (listelm)->field.le_prev; \
115 (elm)->field.le_next = (listelm); \
116 *(listelm)->field.le_prev = (elm); \
117 (listelm)->field.le_prev = &(elm)->field.le_next; \
120 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
121 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
122 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
124 (elm)->field.le_prev = &(head)->lh_first; \
127 #define LIST_REMOVE(elm, field) do { \ argument
128 if ((elm)->field.le_next != NULL) \
129 (elm)->field.le_next->field.le_prev = \
130 (elm)->field.le_prev; \
131 *(elm)->field.le_prev = (elm)->field.le_next; \
134 #define LIST_FOREACH(var, head, field) \ argument
137 (var) = ((var)->field.le_next))
144 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
170 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
171 (elm)->field.sle_next = (slistelm)->field.sle_next; \
172 (slistelm)->field.sle_next = (elm); \
175 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
176 (elm)->field.sle_next = (head)->slh_first; \
180 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
181 (head)->slh_first = (head)->slh_first->field.sle_next; \
184 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
186 SLIST_REMOVE_HEAD((head), field); \
190 while(curelm->field.sle_next != (elm)) \
191 curelm = curelm->field.sle_next; \
192 curelm->field.sle_next = \
193 curelm->field.sle_next->field.sle_next; \
197 #define SLIST_FOREACH(var, head, field) \ argument
198 for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
205 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) argument
233 #define STAILQ_INSERT_HEAD(head, elm, field) do { \ argument
234 if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
235 (head)->stqh_last = &(elm)->field.stqe_next; \
239 #define STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
240 (elm)->field.stqe_next = NULL; \
242 (head)->stqh_last = &(elm)->field.stqe_next; \
245 #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
246 if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
247 (head)->stqh_last = &(elm)->field.stqe_next; \
248 (listelm)->field.stqe_next = (elm); \
251 #define STAILQ_REMOVE_HEAD(head, field) do { \ argument
252 if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
256 #define STAILQ_REMOVE(head, elm, type, field) do { \ argument
258 STAILQ_REMOVE_HEAD((head), field); \
261 while (curelm->field.stqe_next != (elm)) \
262 curelm = curelm->field.stqe_next; \
263 if ((curelm->field.stqe_next = \
264 curelm->field.stqe_next->field.stqe_next) == NULL) \
265 (head)->stqh_last = &(curelm)->field.stqe_next; \
269 #define STAILQ_FOREACH(var, head, field) \ argument
272 (var) = ((var)->field.stqe_next))
279 #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) argument
307 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
308 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
309 (head)->sqh_last = &(elm)->field.sqe_next; \
313 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
314 (elm)->field.sqe_next = NULL; \
316 (head)->sqh_last = &(elm)->field.sqe_next; \
319 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
320 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
321 (head)->sqh_last = &(elm)->field.sqe_next; \
322 (listelm)->field.sqe_next = (elm); \
325 #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ argument
326 if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
330 #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ argument
332 SIMPLEQ_REMOVE_HEAD((head), field); \
335 while (curelm->field.sqe_next != (elm)) \
336 curelm = curelm->field.sqe_next; \
337 if ((curelm->field.sqe_next = \
338 curelm->field.sqe_next->field.sqe_next) == NULL) \
339 (head)->sqh_last = &(curelm)->field.sqe_next; \
343 #define SIMPLEQ_FOREACH(var, head, field) \ argument
346 (var) = ((var)->field.sqe_next))
353 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
384 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
385 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
386 (head)->tqh_first->field.tqe_prev = \
387 &(elm)->field.tqe_next; \
389 (head)->tqh_last = &(elm)->field.tqe_next; \
391 (elm)->field.tqe_prev = &(head)->tqh_first; \
394 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
395 (elm)->field.tqe_next = NULL; \
396 (elm)->field.tqe_prev = (head)->tqh_last; \
398 (head)->tqh_last = &(elm)->field.tqe_next; \
401 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
402 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
403 (elm)->field.tqe_next->field.tqe_prev = \
404 &(elm)->field.tqe_next; \
406 (head)->tqh_last = &(elm)->field.tqe_next; \
407 (listelm)->field.tqe_next = (elm); \
408 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
411 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
412 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
413 (elm)->field.tqe_next = (listelm); \
414 *(listelm)->field.tqe_prev = (elm); \
415 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
418 #define TAILQ_REMOVE(head, elm, field) do { \ argument
419 if (((elm)->field.tqe_next) != NULL) \
420 (elm)->field.tqe_next->field.tqe_prev = \
421 (elm)->field.tqe_prev; \
423 (head)->tqh_last = (elm)->field.tqe_prev; \
424 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
427 #define TAILQ_FOREACH(var, head, field) \ argument
430 (var) = ((var)->field.tqe_next))
432 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
435 (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
442 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
446 #define TAILQ_PREV(elm, headname, field) \ argument
447 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
476 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
477 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
478 (elm)->field.cqe_prev = (listelm); \
479 if ((listelm)->field.cqe_next == (void *)(head)) \
482 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
483 (listelm)->field.cqe_next = (elm); \
486 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
487 (elm)->field.cqe_next = (listelm); \
488 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
489 if ((listelm)->field.cqe_prev == (void *)(head)) \
492 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
493 (listelm)->field.cqe_prev = (elm); \
496 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
497 (elm)->field.cqe_next = (head)->cqh_first; \
498 (elm)->field.cqe_prev = (void *)(head); \
502 (head)->cqh_first->field.cqe_prev = (elm); \
506 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
507 (elm)->field.cqe_next = (void *)(head); \
508 (elm)->field.cqe_prev = (head)->cqh_last; \
512 (head)->cqh_last->field.cqe_next = (elm); \
516 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
517 if ((elm)->field.cqe_next == (void *)(head)) \
518 (head)->cqh_last = (elm)->field.cqe_prev; \
520 (elm)->field.cqe_next->field.cqe_prev = \
521 (elm)->field.cqe_prev; \
522 if ((elm)->field.cqe_prev == (void *)(head)) \
523 (head)->cqh_first = (elm)->field.cqe_next; \
525 (elm)->field.cqe_prev->field.cqe_next = \
526 (elm)->field.cqe_next; \
529 #define CIRCLEQ_FOREACH(var, head, field) \ argument
532 (var) = ((var)->field.cqe_next))
534 #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ argument
537 (var) = ((var)->field.cqe_prev))
545 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
546 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
548 #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ argument
549 (((elm)->field.cqe_next == (void *)(head)) \
551 : (elm->field.cqe_next))
552 #define CIRCLEQ_LOOP_PREV(head, elm, field) \ argument
553 (((elm)->field.cqe_prev == (void *)(head)) \
555 : (elm->field.cqe_prev))