Lines Matching refs:elm

107 #define	LIST_INSERT_AFTER(listelm, elm, field) do {			\  argument
108 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
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;\
125 (head)->lh_first = (elm); \
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; \
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; \
179 (head)->slh_first = (elm); \
186 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
187 if ((head)->slh_first == (elm)) { \
192 while(curelm->field.sle_next != (elm)) \
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; \
238 (head)->stqh_first = (elm); \
241 #define STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
242 (elm)->field.stqe_next = NULL; \
243 *(head)->stqh_last = (elm); \
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); \
258 #define STAILQ_REMOVE(head, elm, type, field) do { \ argument
259 if ((head)->stqh_first == (elm)) { \
263 while (curelm->field.stqe_next != (elm)) \
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; \
312 (head)->sqh_first = (elm); \
315 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
316 (elm)->field.sqe_next = NULL; \
317 *(head)->sqh_last = (elm); \
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); \
332 #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ argument
333 if ((head)->sqh_first == (elm)) { \
337 while (curelm->field.sqe_next != (elm)) \
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) \
389 &(elm)->field.tqe_next; \
391 (head)->tqh_last = &(elm)->field.tqe_next; \
392 (head)->tqh_first = (elm); \
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; \
399 *(head)->tqh_last = (elm); \
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; \
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); \
482 (head)->cqh_last = (elm); \
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; \
492 (head)->cqh_first = (elm); \
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); \
502 (head)->cqh_last = (elm); \
504 (head)->cqh_first->field.cqe_prev = (elm); \
505 (head)->cqh_first = (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; \
512 (head)->cqh_first = (elm); \
514 (head)->cqh_last->field.cqe_next = (elm); \
515 (head)->cqh_last = (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; \
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))