Lines Matching refs:field
109 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) argument
111 #define SLIST_FOREACH(var, head, field) \ argument
114 (var) = SLIST_NEXT(var, field))
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; \
133 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
134 (head)->slh_first = (head)->slh_first->field.sle_next; \
160 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
162 #define LIST_FOREACH(var, head, field) \ argument
165 (var) = LIST_NEXT(var, field))
174 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
175 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
176 (listelm)->field.le_next->field.le_prev = \
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;\
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) \
205 (elm2)->field.le_next->field.le_prev = \
206 &(elm2)->field.le_next; \
207 (elm2)->field.le_prev = (elm)->field.le_prev; \
208 *(elm2)->field.le_prev = (elm2); \
234 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
236 #define SIMPLEQ_FOREACH(var, head, field) \ argument
239 (var) = SIMPLEQ_NEXT(var, field))
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; \
255 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
256 (elm)->field.sqe_next = NULL; \
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))
304 #define TAILQ_FOREACH(var, head, field) \ argument
307 (var) = TAILQ_NEXT(var, field))
309 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
312 (var) = TAILQ_PREV(var, headname, field))
322 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
323 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
324 (head)->tqh_first->field.tqe_prev = \
325 &(elm)->field.tqe_next; \
327 (head)->tqh_last = &(elm)->field.tqe_next; \
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; \
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) \
367 (elm2)->field.tqe_next->field.tqe_prev = \
368 &(elm2)->field.tqe_next; \
370 (head)->tqh_last = &(elm2)->field.tqe_next; \
371 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
372 *(elm2)->field.tqe_prev = (elm2); \
399 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
400 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
404 #define CIRCLEQ_FOREACH(var, head, field) \ argument
407 (var) = CIRCLEQ_NEXT(var, field))
409 #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ argument
412 (var) = CIRCLEQ_PREV(var, field))
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); \
425 if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
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; \
435 if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
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); \
448 (head)->cqh_first->field.cqe_prev = (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; \
458 (head)->cqh_last->field.cqe_next = (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) == \
480 (elm2)->field.cqe_next->field.cqe_prev = (elm2); \
481 if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \
485 (elm2)->field.cqe_prev->field.cqe_next = (elm2); \