Lines Matching refs:elm

68 #define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
71 #define TAILQ_PREV(elm, headname, field) \
72 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
94 #define TAILQ_INSERT_HEAD(head, elm, field) do { \
95 if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\
97 &(elm)->field.tqe_next; \
99 (head)->tqh_last = &(elm)->field.tqe_next; \
100 (head)->tqh_first = (elm); \
101 (elm)->field.tqe_prev = &(head)->tqh_first; \
104 #define TAILQ_INSERT_TAIL(head, elm, field) do { \
105 (elm)->field.tqe_next = TAILQ_END(head); \
106 (elm)->field.tqe_prev = (head)->tqh_last; \
107 *(head)->tqh_last = (elm); \
108 (head)->tqh_last = &(elm)->field.tqe_next; \
111 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
112 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \
114 (elm)->field.tqe_next->field.tqe_prev = \
115 &(elm)->field.tqe_next; \
117 (head)->tqh_last = &(elm)->field.tqe_next; \
118 (listelm)->field.tqe_next = (elm); \
119 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
122 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
123 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
124 (elm)->field.tqe_next = (listelm); \
125 *(listelm)->field.tqe_prev = (elm); \
126 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
129 #define TAILQ_REMOVE(head, elm, field) do { \
130 if (((elm)->field.tqe_next) != TAILQ_END(head)) \
131 (elm)->field.tqe_next->field.tqe_prev = \
132 (elm)->field.tqe_prev; \
134 (head)->tqh_last = (elm)->field.tqe_prev; \
135 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
140 #define TAILQ_REPLACE(head, elm, elm2, field) do { \
141 if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \
147 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \