Home | History | Annotate | Download | only in sys

Lines Matching refs:elm

105 #define	LIST_INSERT_AFTER(listelm, elm, field) do {			\
106 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
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 { \
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 { \
121 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
122 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
123 (head)->lh_first = (elm); \
124 (elm)->field.le_prev = &(head)->lh_first; \
127 #define LIST_REMOVE(elm, field) do { \
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; \
144 #define LIST_NEXT(elm, field) ((elm)->field.le_next)
170 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
171 (elm)->field.sle_next = (slistelm)->field.sle_next; \
172 (slistelm)->field.sle_next = (elm); \
175 #define SLIST_INSERT_HEAD(head, elm, field) do { \
176 (elm)->field.sle_next = (head)->slh_first; \
177 (head)->slh_first = (elm); \
184 #define SLIST_REMOVE(head, elm, type, field) do { \
185 if ((head)->slh_first == (elm)) { \
190 while(curelm->field.sle_next != (elm)) \
205 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
233 #define STAILQ_INSERT_HEAD(head, elm, field) do { \
234 if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
235 (head)->stqh_last = &(elm)->field.stqe_next; \
236 (head)->stqh_first = (elm); \
239 #define STAILQ_INSERT_TAIL(head, elm, field) do { \
240 (elm)->field.stqe_next = NULL; \
241 *(head)->stqh_last = (elm); \
242 (head)->stqh_last = &(elm)->field.stqe_next; \
245 #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
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); \
256 #define STAILQ_REMOVE(head, elm, type, field) do { \
257 if ((head)->stqh_first == (elm)) { \
261 while (curelm->field.stqe_next != (elm)) \
279 #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
307 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
308 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
309 (head)->sqh_last = &(elm)->field.sqe_next; \
310 (head)->sqh_first = (elm); \
313 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
314 (elm)->field.sqe_next = NULL; \
315 *(head)->sqh_last = (elm); \
316 (head)->sqh_last = &(elm)->field.sqe_next; \
319 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
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); \
330 #define SIMPLEQ_REMOVE(head, elm, type, field) do { \
331 if ((head)->sqh_first == (elm)) { \
335 while (curelm->field.sqe_next != (elm)) \
353 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
384 #define TAILQ_INSERT_HEAD(head, elm, field) do { \
385 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
387 &(elm)->field.tqe_next; \
389 (head)->tqh_last = &(elm)->field.tqe_next; \
390 (head)->tqh_first = (elm); \
391 (elm)->field.tqe_prev = &(head)->tqh_first; \
394 #define TAILQ_INSERT_TAIL(head, elm, field) do { \
395 (elm)->field.tqe_next = NULL; \
396 (elm)->field.tqe_prev = (head)->tqh_last; \
397 *(head)->tqh_last = (elm); \
398 (head)->tqh_last = &(elm)->field.tqe_next; \
401 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
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 { \
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 { \
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; \
442 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
446 #define TAILQ_PREV(elm, headname, field) \
447 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
476 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
477 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
478 (elm)->field.cqe_prev = (listelm); \
480 (head)->cqh_last = (elm); \
482 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
483 elm); \
486 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
487 (elm)->field.cqe_next = (listelm); \
488 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
490 (head)->cqh_first = (elm); \
492 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
493 (listelm)->field.cqe_prev = (elm); \
496 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
497 (elm)->field.cqe_next = (head)->cqh_first; \
498 (elm)->field.cqe_prev = (void *)(head); \
500 (head)->cqh_last = (elm); \
502 (head)->cqh_first->field.cqe_prev = (elm); \
503 (head)->cqh_first = (elm); \
506 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
507 (elm)->field.cqe_next = (void *)(head); \
508 (elm)->field.cqe_prev = (head)->cqh_last; \
510 (head)->cqh_first = (elm); \
512 (head)->cqh_last->field.cqe_next = (elm); \
513 (head)->cqh_last = (elm); \
516 #define CIRCLEQ_REMOVE(head, elm, field) do { \
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; \
545 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
546 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
548 #define CIRCLEQ_LOOP_NEXT(head, elm, field) \
549 (((elm)->field.cqe_next == (void *)(head)) \
551 : (elm->field.cqe_next))
552 #define CIRCLEQ_LOOP_PREV(head, elm, field) \
553 (((elm)->field.cqe_prev == (void *)(head)) \
555 : (elm->field.cqe_prev))