Lines Matching full:elm

109 #define	SLIST_NEXT(elm, field)	((elm)->field.sle_next)  argument
123 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
124 (elm)->field.sle_next = (slistelm)->field.sle_next; \
125 (slistelm)->field.sle_next = (elm); \
128 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
129 (elm)->field.sle_next = (head)->slh_first; \
130 (head)->slh_first = (elm); \
160 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
174 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
175 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
177 &(elm)->field.le_next; \
178 (listelm)->field.le_next = (elm); \
179 (elm)->field.le_prev = &(listelm)->field.le_next; \
182 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
183 (elm)->field.le_prev = (listelm)->field.le_prev; \
184 (elm)->field.le_next = (listelm); \
185 *(listelm)->field.le_prev = (elm); \
186 (listelm)->field.le_prev = &(elm)->field.le_next; \
189 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
190 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
191 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
192 (head)->lh_first = (elm); \
193 (elm)->field.le_prev = &(head)->lh_first; \
196 #define LIST_REMOVE(elm, field) do { \ argument
197 if ((elm)->field.le_next != NULL) \
198 (elm)->field.le_next->field.le_prev = \
199 (elm)->field.le_prev; \
200 *(elm)->field.le_prev = (elm)->field.le_next; \
203 #define LIST_REPLACE(elm, elm2, field) do { \ argument
204 if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
207 (elm2)->field.le_prev = (elm)->field.le_prev; \
234 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
249 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
250 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
251 (head)->sqh_last = &(elm)->field.sqe_next; \
252 (head)->sqh_first = (elm); \
255 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
256 (elm)->field.sqe_next = NULL; \
257 *(head)->sqh_last = (elm); \
258 (head)->sqh_last = &(elm)->field.sqe_next; \
261 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
262 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
263 (head)->sqh_last = &(elm)->field.sqe_next; \
264 (listelm)->field.sqe_next = (elm); \
267 #define SIMPLEQ_REMOVE_HEAD(head, elm, field) do { \ argument
268 if (((head)->sqh_first = (elm)->field.sqe_next) == NULL) \
295 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
299 #define TAILQ_PREV(elm, headname, field) \ argument
300 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
322 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
323 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
325 &(elm)->field.tqe_next; \
327 (head)->tqh_last = &(elm)->field.tqe_next; \
328 (head)->tqh_first = (elm); \
329 (elm)->field.tqe_prev = &(head)->tqh_first; \
332 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
333 (elm)->field.tqe_next = NULL; \
334 (elm)->field.tqe_prev = (head)->tqh_last; \
335 *(head)->tqh_last = (elm); \
336 (head)->tqh_last = &(elm)->field.tqe_next; \
339 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
340 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
341 (elm)->field.tqe_next->field.tqe_prev = \
342 &(elm)->field.tqe_next; \
344 (head)->tqh_last = &(elm)->field.tqe_next; \
345 (listelm)->field.tqe_next = (elm); \
346 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
349 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
350 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
351 (elm)->field.tqe_next = (listelm); \
352 *(listelm)->field.tqe_prev = (elm); \
353 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
356 #define TAILQ_REMOVE(head, elm, field) do { \ argument
357 if (((elm)->field.tqe_next) != NULL) \
358 (elm)->field.tqe_next->field.tqe_prev = \
359 (elm)->field.tqe_prev; \
361 (head)->tqh_last = (elm)->field.tqe_prev; \
362 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
365 #define TAILQ_REPLACE(head, elm, elm2, field) do { \ argument
366 if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
371 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
399 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
400 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
422 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
423 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
424 (elm)->field.cqe_prev = (listelm); \
426 (head)->cqh_last = (elm); \
428 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
429 (listelm)->field.cqe_next = (elm); \
432 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
433 (elm)->field.cqe_next = (listelm); \
434 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
436 (head)->cqh_first = (elm); \
438 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
439 (listelm)->field.cqe_prev = (elm); \
442 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
443 (elm)->field.cqe_next = (head)->cqh_first; \
444 (elm)->field.cqe_prev = CIRCLEQ_END(head); \
446 (head)->cqh_last = (elm); \
448 (head)->cqh_first->field.cqe_prev = (elm); \
449 (head)->cqh_first = (elm); \
452 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
453 (elm)->field.cqe_next = CIRCLEQ_END(head); \
454 (elm)->field.cqe_prev = (head)->cqh_last; \
456 (head)->cqh_first = (elm); \
458 (head)->cqh_last->field.cqe_next = (elm); \
459 (head)->cqh_last = (elm); \
462 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
463 if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
464 (head)->cqh_last = (elm)->field.cqe_prev; \
466 (elm)->field.cqe_next->field.cqe_prev = \
467 (elm)->field.cqe_prev; \
468 if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
469 (head)->cqh_first = (elm)->field.cqe_next; \
471 (elm)->field.cqe_prev->field.cqe_next = \
472 (elm)->field.cqe_next; \
475 #define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \ argument
476 if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \
481 if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \