Lines Matching full:field
198 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) argument
200 #define SLIST_FOREACH(var, head, field) \ argument
203 (var) = SLIST_NEXT(var, field))
205 #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ argument
207 (var) && ((tvar) = SLIST_NEXT(var, field), 1); \
217 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
218 (elm)->field.sle_next = (slistelm)->field.sle_next; \
219 (slistelm)->field.sle_next = (elm); \
222 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
223 (elm)->field.sle_next = (head)->slh_first; \
227 #define SLIST_REMOVE_AFTER(elm, field) do { \ argument
228 (elm)->field.sle_next = (elm)->field.sle_next->field.sle_next; \
231 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
232 (head)->slh_first = (head)->slh_first->field.sle_next; \
235 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
237 SLIST_REMOVE_HEAD((head), field); \
241 while (curelm->field.sle_next != (elm)) \
242 curelm = curelm->field.sle_next; \
243 curelm->field.sle_next = \
244 curelm->field.sle_next->field.sle_next; \
245 _Q_INVALIDATE((elm)->field.sle_next); \
272 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
274 #define LIST_FOREACH(var, head, field) \ argument
277 (var) = LIST_NEXT(var, field))
279 #define LIST_FOREACH_SAFE(var, head, field, tvar) \ argument
281 (var) && ((tvar) = LIST_NEXT(var, field), 1); \
291 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
292 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
293 (listelm)->field.le_next->field.le_prev = \
294 &(elm)->field.le_next; \
295 (listelm)->field.le_next = (elm); \
296 (elm)->field.le_prev = &(listelm)->field.le_next; \
299 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
300 (elm)->field.le_prev = (listelm)->field.le_prev; \
301 (elm)->field.le_next = (listelm); \
302 *(listelm)->field.le_prev = (elm); \
303 (listelm)->field.le_prev = &(elm)->field.le_next; \
306 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
307 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
308 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
310 (elm)->field.le_prev = &(head)->lh_first; \
313 #define LIST_REMOVE(elm, field) do { \ argument
314 if ((elm)->field.le_next != NULL) \
315 (elm)->field.le_next->field.le_prev = \
316 (elm)->field.le_prev; \
317 *(elm)->field.le_prev = (elm)->field.le_next; \
318 _Q_INVALIDATE((elm)->field.le_prev); \
319 _Q_INVALIDATE((elm)->field.le_next); \
322 #define LIST_REPLACE(elm, elm2, field) do { \ argument
323 if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
324 (elm2)->field.le_next->field.le_prev = \
325 &(elm2)->field.le_next; \
326 (elm2)->field.le_prev = (elm)->field.le_prev; \
327 *(elm2)->field.le_prev = (elm2); \
328 _Q_INVALIDATE((elm)->field.le_prev); \
329 _Q_INVALIDATE((elm)->field.le_next); \
355 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
357 #define SIMPLEQ_FOREACH(var, head, field) \ argument
360 (var) = SIMPLEQ_NEXT(var, field))
362 #define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \ argument
364 (var) && ((tvar) = SIMPLEQ_NEXT(var, field), 1); \
375 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
376 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
377 (head)->sqh_last = &(elm)->field.sqe_next; \
381 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
382 (elm)->field.sqe_next = NULL; \
384 (head)->sqh_last = &(elm)->field.sqe_next; \
387 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
388 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
389 (head)->sqh_last = &(elm)->field.sqe_next; \
390 (listelm)->field.sqe_next = (elm); \
393 #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ argument
394 if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
398 #define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \ argument
399 if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
401 (head)->sqh_last = &(elm)->field.sqe_next; \
427 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
431 #define TAILQ_PREV(elm, headname, field) \ argument
432 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
436 #define TAILQ_FOREACH(var, head, field) \ argument
439 (var) = TAILQ_NEXT(var, field))
441 #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ argument
444 ((tvar) = TAILQ_NEXT(var, field), 1); \
448 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
451 (var) = TAILQ_PREV(var, headname, field))
453 #define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ argument
456 ((tvar) = TAILQ_PREV(var, headname, field), 1); \
467 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
468 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
469 (head)->tqh_first->field.tqe_prev = \
470 &(elm)->field.tqe_next; \
472 (head)->tqh_last = &(elm)->field.tqe_next; \
474 (elm)->field.tqe_prev = &(head)->tqh_first; \
477 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
478 (elm)->field.tqe_next = NULL; \
479 (elm)->field.tqe_prev = (head)->tqh_last; \
481 (head)->tqh_last = &(elm)->field.tqe_next; \
484 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
485 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
486 (elm)->field.tqe_next->field.tqe_prev = \
487 &(elm)->field.tqe_next; \
489 (head)->tqh_last = &(elm)->field.tqe_next; \
490 (listelm)->field.tqe_next = (elm); \
491 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
494 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
495 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
496 (elm)->field.tqe_next = (listelm); \
497 *(listelm)->field.tqe_prev = (elm); \
498 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
501 #define TAILQ_REMOVE(head, elm, field) do { \ argument
502 if (((elm)->field.tqe_next) != NULL) \
503 (elm)->field.tqe_next->field.tqe_prev = \
504 (elm)->field.tqe_prev; \
506 (head)->tqh_last = (elm)->field.tqe_prev; \
507 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
508 _Q_INVALIDATE((elm)->field.tqe_prev); \
509 _Q_INVALIDATE((elm)->field.tqe_next); \
512 #define TAILQ_REPLACE(head, elm, elm2, field) do { \ argument
513 if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
514 (elm2)->field.tqe_next->field.tqe_prev = \
515 &(elm2)->field.tqe_next; \
517 (head)->tqh_last = &(elm2)->field.tqe_next; \
518 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
519 *(elm2)->field.tqe_prev = (elm2); \
520 _Q_INVALIDATE((elm)->field.tqe_prev); \
521 _Q_INVALIDATE((elm)->field.tqe_next); \
548 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
549 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
553 #define CIRCLEQ_FOREACH(var, head, field) \ argument
556 (var) = CIRCLEQ_NEXT(var, field))
558 #define CIRCLEQ_FOREACH_SAFE(var, head, field, tvar) \ argument
561 ((tvar) = CIRCLEQ_NEXT(var, field), 1); \
564 #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ argument
567 (var) = CIRCLEQ_PREV(var, field))
569 #define CIRCLEQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ argument
572 ((tvar) = CIRCLEQ_PREV(var, headname, field), 1); \
583 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
584 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
585 (elm)->field.cqe_prev = (listelm); \
586 if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
589 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
590 (listelm)->field.cqe_next = (elm); \
593 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
594 (elm)->field.cqe_next = (listelm); \
595 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
596 if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
599 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
600 (listelm)->field.cqe_prev = (elm); \
603 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
604 (elm)->field.cqe_next = (head)->cqh_first; \
605 (elm)->field.cqe_prev = CIRCLEQ_END(head); \
609 (head)->cqh_first->field.cqe_prev = (elm); \
613 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
614 (elm)->field.cqe_next = CIRCLEQ_END(head); \
615 (elm)->field.cqe_prev = (head)->cqh_last; \
619 (head)->cqh_last->field.cqe_next = (elm); \
623 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
624 if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
625 (head)->cqh_last = (elm)->field.cqe_prev; \
627 (elm)->field.cqe_next->field.cqe_prev = \
628 (elm)->field.cqe_prev; \
629 if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
630 (head)->cqh_first = (elm)->field.cqe_next; \
632 (elm)->field.cqe_prev->field.cqe_next = \
633 (elm)->field.cqe_next; \
634 _Q_INVALIDATE((elm)->field.cqe_prev); \
635 _Q_INVALIDATE((elm)->field.cqe_next); \
638 #define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \ argument
639 if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \
643 (elm2)->field.cqe_next->field.cqe_prev = (elm2); \
644 if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \
648 (elm2)->field.cqe_prev->field.cqe_next = (elm2); \
649 _Q_INVALIDATE((elm)->field.cqe_prev); \
650 _Q_INVALIDATE((elm)->field.cqe_next); \