Lines Matching refs:elm

83 #define	LIST_NEXT(elm, field)		((elm)->field.le_next)  argument
93 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
94 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
96 &(elm)->field.le_next; \
97 (listelm)->field.le_next = (elm); \
98 (elm)->field.le_prev = &(listelm)->field.le_next; \
101 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
102 (elm)->field.le_prev = (listelm)->field.le_prev; \
103 (elm)->field.le_next = (listelm); \
104 *(listelm)->field.le_prev = (elm); \
105 (listelm)->field.le_prev = &(elm)->field.le_next; \
108 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
109 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
110 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
111 (head)->lh_first = (elm); \
112 (elm)->field.le_prev = &(head)->lh_first; \
115 #define LIST_REMOVE(elm, field) do { \ argument
116 if ((elm)->field.le_next != NULL) \
117 (elm)->field.le_next->field.le_prev = \
118 (elm)->field.le_prev; \
119 *(elm)->field.le_prev = (elm)->field.le_next; \
138 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
149 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
150 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
152 &(elm)->field.tqe_next; \
154 (head)->tqh_last = &(elm)->field.tqe_next; \
155 (head)->tqh_first = (elm); \
156 (elm)->field.tqe_prev = &(head)->tqh_first; \
159 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
160 (elm)->field.tqe_next = NULL; \
161 (elm)->field.tqe_prev = (head)->tqh_last; \
162 *(head)->tqh_last = (elm); \
163 (head)->tqh_last = &(elm)->field.tqe_next; \
166 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
167 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
168 (elm)->field.tqe_next->field.tqe_prev = \
169 &(elm)->field.tqe_next; \
171 (head)->tqh_last = &(elm)->field.tqe_next; \
172 (listelm)->field.tqe_next = (elm); \
173 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
176 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
177 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
178 (elm)->field.tqe_next = (listelm); \
179 *(listelm)->field.tqe_prev = (elm); \
180 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
183 #define TAILQ_REMOVE(head, elm, field) do { \ argument
184 if (((elm)->field.tqe_next) != NULL) \
185 (elm)->field.tqe_next->field.tqe_prev = \
186 (elm)->field.tqe_prev; \
188 (head)->tqh_last = (elm)->field.tqe_prev; \
189 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
210 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
211 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
221 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
222 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
223 (elm)->field.cqe_prev = (listelm); \
225 (head)->cqh_last = (elm); \
227 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
228 (listelm)->field.cqe_next = (elm); \
231 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
232 (elm)->field.cqe_next = (listelm); \
233 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
235 (head)->cqh_first = (elm); \
237 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
238 (listelm)->field.cqe_prev = (elm); \
241 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
242 (elm)->field.cqe_next = (head)->cqh_first; \
243 (elm)->field.cqe_prev = (void *)(head); \
245 (head)->cqh_last = (elm); \
247 (head)->cqh_first->field.cqe_prev = (elm); \
248 (head)->cqh_first = (elm); \
251 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
252 (elm)->field.cqe_next = (void *)(head); \
253 (elm)->field.cqe_prev = (head)->cqh_last; \
255 (head)->cqh_first = (elm); \
257 (head)->cqh_last->field.cqe_next = (elm); \
258 (head)->cqh_last = (elm); \
261 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
262 if ((elm)->field.cqe_next == (void *)(head)) \
263 (head)->cqh_last = (elm)->field.cqe_prev; \
265 (elm)->field.cqe_next->field.cqe_prev = \
266 (elm)->field.cqe_prev; \
267 if ((elm)->field.cqe_prev == (void *)(head)) \
268 (head)->cqh_first = (elm)->field.cqe_next; \
270 (elm)->field.cqe_prev->field.cqe_next = \
271 (elm)->field.cqe_next; \