Lines Matching full:field
205 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) argument
207 #define SLIST_FOREACH(var, head, field) \ argument
210 (var) = SLIST_NEXT(var, field))
212 #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ argument
214 (var) && ((tvar) = SLIST_NEXT(var, field), 1); \
224 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
225 (elm)->field.sle_next = (slistelm)->field.sle_next; \
226 (slistelm)->field.sle_next = (elm); \
229 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
230 (elm)->field.sle_next = (head)->slh_first; \
234 #define SLIST_REMOVE_AFTER(elm, field) do { \ argument
235 (elm)->field.sle_next = (elm)->field.sle_next->field.sle_next; \
238 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
239 (head)->slh_first = (head)->slh_first->field.sle_next; \
242 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
244 SLIST_REMOVE_HEAD((head), field); \
248 while (curelm->field.sle_next != (elm)) \
249 curelm = curelm->field.sle_next; \
250 curelm->field.sle_next = \
251 curelm->field.sle_next->field.sle_next; \
253 _Q_INVALIDATE((elm)->field.sle_next); \
279 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
281 #define LIST_FOREACH(var, head, field) \ argument
284 (var) = LIST_NEXT(var, field))
286 #define LIST_FOREACH_SAFE(var, head, field, tvar) \ argument
288 (var) && ((tvar) = LIST_NEXT(var, field), 1); \
298 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
299 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
300 (listelm)->field.le_next->field.le_prev = \
301 &(elm)->field.le_next; \
302 (listelm)->field.le_next = (elm); \
303 (elm)->field.le_prev = &(listelm)->field.le_next; \
306 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
307 (elm)->field.le_prev = (listelm)->field.le_prev; \
308 (elm)->field.le_next = (listelm); \
309 *(listelm)->field.le_prev = (elm); \
310 (listelm)->field.le_prev = &(elm)->field.le_next; \
313 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
314 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
315 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
317 (elm)->field.le_prev = &(head)->lh_first; \
320 #define LIST_REMOVE(elm, field) do { \ argument
321 if ((elm)->field.le_next != NULL) \
322 (elm)->field.le_next->field.le_prev = \
323 (elm)->field.le_prev; \
324 *(elm)->field.le_prev = (elm)->field.le_next; \
325 _Q_INVALIDATE((elm)->field.le_prev); \
326 _Q_INVALIDATE((elm)->field.le_next); \
329 #define LIST_REPLACE(elm, elm2, field) do { \ argument
330 if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
331 (elm2)->field.le_next->field.le_prev = \
332 &(elm2)->field.le_next; \
333 (elm2)->field.le_prev = (elm)->field.le_prev; \
334 *(elm2)->field.le_prev = (elm2); \
335 _Q_INVALIDATE((elm)->field.le_prev); \
336 _Q_INVALIDATE((elm)->field.le_next); \
362 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
364 #define SIMPLEQ_FOREACH(var, head, field) \ argument
367 (var) = SIMPLEQ_NEXT(var, field))
369 #define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \ argument
371 (var) && ((tvar) = SIMPLEQ_NEXT(var, field), 1); \
382 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
383 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
384 (head)->sqh_last = &(elm)->field.sqe_next; \
388 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
389 (elm)->field.sqe_next = NULL; \
391 (head)->sqh_last = &(elm)->field.sqe_next; \
394 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
395 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
396 (head)->sqh_last = &(elm)->field.sqe_next; \
397 (listelm)->field.sqe_next = (elm); \
400 #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ argument
401 if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
405 #define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \ argument
406 if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
408 (head)->sqh_last = &(elm)->field.sqe_next; \
442 #define XSIMPLEQ_NEXT(head, elm, field) XSIMPLEQ_XOR(head, ((elm)->field.sqx_next)) argument
445 #define XSIMPLEQ_FOREACH(var, head, field) \ argument
448 (var) = XSIMPLEQ_NEXT(head, var, field))
450 #define XSIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \ argument
452 (var) && ((tvar) = XSIMPLEQ_NEXT(head, var, field), 1); \
464 #define XSIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
465 if (((elm)->field.sqx_next = (head)->sqx_first) == \
467 (head)->sqx_last = XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
471 #define XSIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
472 (elm)->field.sqx_next = XSIMPLEQ_XOR(head, NULL); \
474 (head)->sqx_last = XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
477 #define XSIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
478 if (((elm)->field.sqx_next = (listelm)->field.sqx_next) == \
480 (head)->sqx_last = XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
481 (listelm)->field.sqx_next = XSIMPLEQ_XOR(head, (elm)); \
484 #define XSIMPLEQ_REMOVE_HEAD(head, field) do { \ argument
486 (head)->sqx_first)->field.sqx_next) == XSIMPLEQ_XOR(head, NULL)) \
490 #define XSIMPLEQ_REMOVE_AFTER(head, elm, field) do { \ argument
491 if (((elm)->field.sqx_next = XSIMPLEQ_XOR(head, \
492 (elm)->field.sqx_next)->field.sqx_next) \
495 XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
522 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
526 #define TAILQ_PREV(elm, headname, field) \ argument
527 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
531 #define TAILQ_FOREACH(var, head, field) \ argument
534 (var) = TAILQ_NEXT(var, field))
536 #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ argument
539 ((tvar) = TAILQ_NEXT(var, field), 1); \
543 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
546 (var) = TAILQ_PREV(var, headname, field))
548 #define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ argument
551 ((tvar) = TAILQ_PREV(var, headname, field), 1); \
562 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
563 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
564 (head)->tqh_first->field.tqe_prev = \
565 &(elm)->field.tqe_next; \
567 (head)->tqh_last = &(elm)->field.tqe_next; \
569 (elm)->field.tqe_prev = &(head)->tqh_first; \
572 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
573 (elm)->field.tqe_next = NULL; \
574 (elm)->field.tqe_prev = (head)->tqh_last; \
576 (head)->tqh_last = &(elm)->field.tqe_next; \
579 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
580 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
581 (elm)->field.tqe_next->field.tqe_prev = \
582 &(elm)->field.tqe_next; \
584 (head)->tqh_last = &(elm)->field.tqe_next; \
585 (listelm)->field.tqe_next = (elm); \
586 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
589 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
590 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
591 (elm)->field.tqe_next = (listelm); \
592 *(listelm)->field.tqe_prev = (elm); \
593 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
596 #define TAILQ_REMOVE(head, elm, field) do { \ argument
597 if (((elm)->field.tqe_next) != NULL) \
598 (elm)->field.tqe_next->field.tqe_prev = \
599 (elm)->field.tqe_prev; \
601 (head)->tqh_last = (elm)->field.tqe_prev; \
602 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
603 _Q_INVALIDATE((elm)->field.tqe_prev); \
604 _Q_INVALIDATE((elm)->field.tqe_next); \
607 #define TAILQ_REPLACE(head, elm, elm2, field) do { \ argument
608 if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
609 (elm2)->field.tqe_next->field.tqe_prev = \
610 &(elm2)->field.tqe_next; \
612 (head)->tqh_last = &(elm2)->field.tqe_next; \
613 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
614 *(elm2)->field.tqe_prev = (elm2); \
615 _Q_INVALIDATE((elm)->field.tqe_prev); \
616 _Q_INVALIDATE((elm)->field.tqe_next); \
619 #define TAILQ_CONCAT(head1, head2, field) do { \ argument
622 (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \