• Home
  • Raw
  • Download

Lines Matching refs:field

127 #define	SLIST_FOREACH(var, head, field)					\  argument
130 (var) = SLIST_NEXT((var), field))
136 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
137 SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \
138 SLIST_NEXT((slistelm), field) = (elm); \
141 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
142 SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \
146 #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) argument
148 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
150 SLIST_REMOVE_HEAD((head), field); \
154 while (SLIST_NEXT(curelm, field) != (elm)) \
155 curelm = SLIST_NEXT(curelm, field); \
156 SLIST_NEXT(curelm, field) = \
157 SLIST_NEXT(SLIST_NEXT(curelm, field), field); \
161 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
162 SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
189 #define STAILQ_FOREACH(var, head, field) \ argument
192 (var) = STAILQ_NEXT((var), field))
199 #define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ argument
200 if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
201 (head)->stqh_last = &STAILQ_NEXT((elm), field); \
202 STAILQ_NEXT((tqelm), field) = (elm); \
205 #define STAILQ_INSERT_HEAD(head, elm, field) do { \ argument
206 if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \
207 (head)->stqh_last = &STAILQ_NEXT((elm), field); \
211 #define STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
212 STAILQ_NEXT((elm), field) = NULL; \
214 (head)->stqh_last = &STAILQ_NEXT((elm), field); \
219 #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) argument
221 #define STAILQ_REMOVE(head, elm, type, field) do { \ argument
223 STAILQ_REMOVE_HEAD(head, field); \
227 while (STAILQ_NEXT(curelm, field) != (elm)) \
228 curelm = STAILQ_NEXT(curelm, field); \
229 if ((STAILQ_NEXT(curelm, field) = \
230 STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\
231 (head)->stqh_last = &STAILQ_NEXT((curelm), field);\
235 #define STAILQ_REMOVE_HEAD(head, field) do { \ argument
237 STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \
241 #define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ argument
242 if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \
271 #define LIST_FOREACH(var, head, field) \ argument
274 (var) = LIST_NEXT((var), field))
280 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
281 if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
282 LIST_NEXT((listelm), field)->field.le_prev = \
283 &LIST_NEXT((elm), field); \
284 LIST_NEXT((listelm), field) = (elm); \
285 (elm)->field.le_prev = &LIST_NEXT((listelm), field); \
288 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
289 (elm)->field.le_prev = (listelm)->field.le_prev; \
290 LIST_NEXT((elm), field) = (listelm); \
291 *(listelm)->field.le_prev = (elm); \
292 (listelm)->field.le_prev = &LIST_NEXT((elm), field); \
295 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
296 if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \
297 LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
299 (elm)->field.le_prev = &LIST_FIRST((head)); \
302 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
304 #define LIST_REMOVE(elm, field) do { \ argument
305 if (LIST_NEXT((elm), field) != NULL) \
306 LIST_NEXT((elm), field)->field.le_prev = \
307 (elm)->field.le_prev; \
308 *(elm)->field.le_prev = LIST_NEXT((elm), field); \
336 #define TAILQ_FOREACH(var, head, field) \ argument
339 (var) = TAILQ_NEXT((var), field))
341 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
344 (var) = TAILQ_PREV((var), headname, field))
351 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
352 if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
353 TAILQ_NEXT((elm), field)->field.tqe_prev = \
354 &TAILQ_NEXT((elm), field); \
356 (head)->tqh_last = &TAILQ_NEXT((elm), field); \
357 TAILQ_NEXT((listelm), field) = (elm); \
358 (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \
361 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
362 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
363 TAILQ_NEXT((elm), field) = (listelm); \
364 *(listelm)->field.tqe_prev = (elm); \
365 (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \
368 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
369 if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \
370 TAILQ_FIRST((head))->field.tqe_prev = \
371 &TAILQ_NEXT((elm), field); \
373 (head)->tqh_last = &TAILQ_NEXT((elm), field); \
375 (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \
378 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
379 TAILQ_NEXT((elm), field) = NULL; \
380 (elm)->field.tqe_prev = (head)->tqh_last; \
382 (head)->tqh_last = &TAILQ_NEXT((elm), field); \
388 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
390 #define TAILQ_PREV(elm, headname, field) \ argument
391 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
393 #define TAILQ_REMOVE(head, elm, field) do { \ argument
394 if ((TAILQ_NEXT((elm), field)) != NULL) \
395 TAILQ_NEXT((elm), field)->field.tqe_prev = \
396 (elm)->field.tqe_prev; \
398 (head)->tqh_last = (elm)->field.tqe_prev; \
399 *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \
427 #define CIRCLEQ_FOREACH(var, head, field) \ argument
430 (var) = CIRCLEQ_NEXT((var), field))
432 #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ argument
435 (var) = CIRCLEQ_PREV((var), field))
442 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
443 CIRCLEQ_NEXT((elm), field) = CIRCLEQ_NEXT((listelm), field); \
444 CIRCLEQ_PREV((elm), field) = (listelm); \
445 if (CIRCLEQ_NEXT((listelm), field) == (void *)(head)) \
448 CIRCLEQ_PREV(CIRCLEQ_NEXT((listelm), field), field) = (elm);\
449 CIRCLEQ_NEXT((listelm), field) = (elm); \
452 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
453 CIRCLEQ_NEXT((elm), field) = (listelm); \
454 CIRCLEQ_PREV((elm), field) = CIRCLEQ_PREV((listelm), field); \
455 if (CIRCLEQ_PREV((listelm), field) == (void *)(head)) \
458 CIRCLEQ_NEXT(CIRCLEQ_PREV((listelm), field), field) = (elm);\
459 CIRCLEQ_PREV((listelm), field) = (elm); \
462 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
463 CIRCLEQ_NEXT((elm), field) = CIRCLEQ_FIRST((head)); \
464 CIRCLEQ_PREV((elm), field) = (void *)(head); \
468 CIRCLEQ_PREV(CIRCLEQ_FIRST((head)), field) = (elm); \
472 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
473 CIRCLEQ_NEXT((elm), field) = (void *)(head); \
474 CIRCLEQ_PREV((elm), field) = CIRCLEQ_LAST((head)); \
478 CIRCLEQ_NEXT(CIRCLEQ_LAST((head)), field) = (elm); \
484 #define CIRCLEQ_NEXT(elm,field) ((elm)->field.cqe_next) argument
486 #define CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev) argument
488 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
489 if (CIRCLEQ_NEXT((elm), field) == (void *)(head)) \
490 CIRCLEQ_LAST((head)) = CIRCLEQ_PREV((elm), field); \
492 CIRCLEQ_PREV(CIRCLEQ_NEXT((elm), field), field) = \
493 CIRCLEQ_PREV((elm), field); \
494 if (CIRCLEQ_PREV((elm), field) == (void *)(head)) \
495 CIRCLEQ_FIRST((head)) = CIRCLEQ_NEXT((elm), field); \
497 CIRCLEQ_NEXT(CIRCLEQ_PREV((elm), field), field) = \
498 CIRCLEQ_NEXT((elm), field); \