• Home
  • Raw
  • Download

Lines Matching refs:elm

105 #define	LIST_INSERT_AFTER(listelm, elm, field) do {			\  argument
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 { \ 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;\
123 (head)->lh_first = (elm); \
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; \
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; \
177 (head)->slh_first = (elm); \
184 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
185 if ((head)->slh_first == (elm)) { \
190 while(curelm->field.sle_next != (elm)) \
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; \
236 (head)->stqh_first = (elm); \
239 #define STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
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 { \ 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); \
256 #define STAILQ_REMOVE(head, elm, type, field) do { \ argument
257 if ((head)->stqh_first == (elm)) { \
261 while (curelm->field.stqe_next != (elm)) \
287 #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) argument
315 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
316 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
317 (head)->sqh_last = &(elm)->field.sqe_next; \
318 (head)->sqh_first = (elm); \
321 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
322 (elm)->field.sqe_next = NULL; \
323 *(head)->sqh_last = (elm); \
324 (head)->sqh_last = &(elm)->field.sqe_next; \
327 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
328 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
329 (head)->sqh_last = &(elm)->field.sqe_next; \
330 (listelm)->field.sqe_next = (elm); \
338 #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ argument
339 if ((head)->sqh_first == (elm)) { \
343 while (curelm->field.sqe_next != (elm)) \
361 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
392 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
393 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
395 &(elm)->field.tqe_next; \
397 (head)->tqh_last = &(elm)->field.tqe_next; \
398 (head)->tqh_first = (elm); \
399 (elm)->field.tqe_prev = &(head)->tqh_first; \
402 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
403 (elm)->field.tqe_next = NULL; \
404 (elm)->field.tqe_prev = (head)->tqh_last; \
405 *(head)->tqh_last = (elm); \
406 (head)->tqh_last = &(elm)->field.tqe_next; \
409 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
410 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
411 (elm)->field.tqe_next->field.tqe_prev = \
412 &(elm)->field.tqe_next; \
414 (head)->tqh_last = &(elm)->field.tqe_next; \
415 (listelm)->field.tqe_next = (elm); \
416 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
419 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
420 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
421 (elm)->field.tqe_next = (listelm); \
422 *(listelm)->field.tqe_prev = (elm); \
423 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
426 #define TAILQ_REMOVE(head, elm, field) do { \ argument
427 if (((elm)->field.tqe_next) != NULL) \
428 (elm)->field.tqe_next->field.tqe_prev = \
429 (elm)->field.tqe_prev; \
431 (head)->tqh_last = (elm)->field.tqe_prev; \
432 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
459 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
463 #define TAILQ_PREV(elm, headname, field) \ argument
464 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
493 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
494 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
495 (elm)->field.cqe_prev = (listelm); \
497 (head)->cqh_last = (elm); \
499 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
500 (listelm)->field.cqe_next = (elm); \
503 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
504 (elm)->field.cqe_next = (listelm); \
505 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
507 (head)->cqh_first = (elm); \
509 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
510 (listelm)->field.cqe_prev = (elm); \
513 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
514 (elm)->field.cqe_next = (head)->cqh_first; \
515 (elm)->field.cqe_prev = (void *)(head); \
517 (head)->cqh_last = (elm); \
519 (head)->cqh_first->field.cqe_prev = (elm); \
520 (head)->cqh_first = (elm); \
523 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
524 (elm)->field.cqe_next = (void *)(head); \
525 (elm)->field.cqe_prev = (head)->cqh_last; \
527 (head)->cqh_first = (elm); \
529 (head)->cqh_last->field.cqe_next = (elm); \
530 (head)->cqh_last = (elm); \
533 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
534 if ((elm)->field.cqe_next == (void *)(head)) \
535 (head)->cqh_last = (elm)->field.cqe_prev; \
537 (elm)->field.cqe_next->field.cqe_prev = \
538 (elm)->field.cqe_prev; \
539 if ((elm)->field.cqe_prev == (void *)(head)) \
540 (head)->cqh_first = (elm)->field.cqe_next; \
542 (elm)->field.cqe_prev->field.cqe_next = \
543 (elm)->field.cqe_next; \
562 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
563 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
565 #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ argument
566 (((elm)->field.cqe_next == (void *)(head)) \
568 : (elm->field.cqe_next))
569 #define CIRCLEQ_LOOP_PREV(head, elm, field) \ argument
570 (((elm)->field.cqe_prev == (void *)(head)) \
572 : (elm->field.cqe_prev))