• Home
  • Raw
  • Download

Lines Matching refs:field

113 #define	SLIST_NEXT(elm, field)	((elm)->field.sle_next)  argument
115 #define SLIST_FOREACH(var, head, field) \ argument
118 (var) = SLIST_NEXT(var, field))
120 #define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ argument
123 (varp) = &SLIST_NEXT((var), field))
132 #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ argument
133 (elm)->field.sle_next = (slistelm)->field.sle_next; \
134 (slistelm)->field.sle_next = (elm); \
137 #define SLIST_INSERT_HEAD(head, elm, field) do { \ argument
138 (elm)->field.sle_next = (head)->slh_first; \
142 #define SLIST_REMOVE_NEXT(head, elm, field) do { \ argument
143 (elm)->field.sle_next = (elm)->field.sle_next->field.sle_next; \
146 #define SLIST_REMOVE_HEAD(head, field) do { \ argument
147 (head)->slh_first = (head)->slh_first->field.sle_next; \
150 #define SLIST_REMOVE(head, elm, type, field) do { \ argument
152 SLIST_REMOVE_HEAD((head), field); \
156 while (curelm->field.sle_next != (elm)) \
157 curelm = curelm->field.sle_next; \
158 curelm->field.sle_next = \
159 curelm->field.sle_next->field.sle_next; \
160 _Q_INVALIDATE((elm)->field.sle_next); \
187 #define LIST_NEXT(elm, field) ((elm)->field.le_next) argument
189 #define LIST_FOREACH(var, head, field) \ argument
192 (var) = LIST_NEXT(var, field))
201 #define LIST_INSERT_AFTER(listelm, elm, field) do { \ argument
202 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
203 (listelm)->field.le_next->field.le_prev = \
204 &(elm)->field.le_next; \
205 (listelm)->field.le_next = (elm); \
206 (elm)->field.le_prev = &(listelm)->field.le_next; \
209 #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ argument
210 (elm)->field.le_prev = (listelm)->field.le_prev; \
211 (elm)->field.le_next = (listelm); \
212 *(listelm)->field.le_prev = (elm); \
213 (listelm)->field.le_prev = &(elm)->field.le_next; \
216 #define LIST_INSERT_HEAD(head, elm, field) do { \ argument
217 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
218 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
220 (elm)->field.le_prev = &(head)->lh_first; \
223 #define LIST_REMOVE(elm, field) do { \ argument
224 if ((elm)->field.le_next != NULL) \
225 (elm)->field.le_next->field.le_prev = \
226 (elm)->field.le_prev; \
227 *(elm)->field.le_prev = (elm)->field.le_next; \
228 _Q_INVALIDATE((elm)->field.le_prev); \
229 _Q_INVALIDATE((elm)->field.le_next); \
232 #define LIST_REPLACE(elm, elm2, field) do { \ argument
233 if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
234 (elm2)->field.le_next->field.le_prev = \
235 &(elm2)->field.le_next; \
236 (elm2)->field.le_prev = (elm)->field.le_prev; \
237 *(elm2)->field.le_prev = (elm2); \
238 _Q_INVALIDATE((elm)->field.le_prev); \
239 _Q_INVALIDATE((elm)->field.le_next); \
265 #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) argument
267 #define SIMPLEQ_FOREACH(var, head, field) \ argument
270 (var) = SIMPLEQ_NEXT(var, field))
280 #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ argument
281 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
282 (head)->sqh_last = &(elm)->field.sqe_next; \
286 #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ argument
287 (elm)->field.sqe_next = NULL; \
289 (head)->sqh_last = &(elm)->field.sqe_next; \
292 #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
293 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
294 (head)->sqh_last = &(elm)->field.sqe_next; \
295 (listelm)->field.sqe_next = (elm); \
298 #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ argument
299 if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
326 #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
330 #define TAILQ_PREV(elm, headname, field) \ argument
331 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
335 #define TAILQ_FOREACH(var, head, field) \ argument
338 (var) = TAILQ_NEXT(var, field))
340 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
343 (var) = TAILQ_PREV(var, headname, field))
353 #define TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
354 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
355 (head)->tqh_first->field.tqe_prev = \
356 &(elm)->field.tqe_next; \
358 (head)->tqh_last = &(elm)->field.tqe_next; \
360 (elm)->field.tqe_prev = &(head)->tqh_first; \
363 #define TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
364 (elm)->field.tqe_next = NULL; \
365 (elm)->field.tqe_prev = (head)->tqh_last; \
367 (head)->tqh_last = &(elm)->field.tqe_next; \
370 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
371 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
372 (elm)->field.tqe_next->field.tqe_prev = \
373 &(elm)->field.tqe_next; \
375 (head)->tqh_last = &(elm)->field.tqe_next; \
376 (listelm)->field.tqe_next = (elm); \
377 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
380 #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
381 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
382 (elm)->field.tqe_next = (listelm); \
383 *(listelm)->field.tqe_prev = (elm); \
384 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
387 #define TAILQ_REMOVE(head, elm, field) do { \ argument
388 if (((elm)->field.tqe_next) != NULL) \
389 (elm)->field.tqe_next->field.tqe_prev = \
390 (elm)->field.tqe_prev; \
392 (head)->tqh_last = (elm)->field.tqe_prev; \
393 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
394 _Q_INVALIDATE((elm)->field.tqe_prev); \
395 _Q_INVALIDATE((elm)->field.tqe_next); \
398 #define TAILQ_REPLACE(head, elm, elm2, field) do { \ argument
399 if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
400 (elm2)->field.tqe_next->field.tqe_prev = \
401 &(elm2)->field.tqe_next; \
403 (head)->tqh_last = &(elm2)->field.tqe_next; \
404 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
405 *(elm2)->field.tqe_prev = (elm2); \
406 _Q_INVALIDATE((elm)->field.tqe_prev); \
407 _Q_INVALIDATE((elm)->field.tqe_next); \
434 #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) argument
435 #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) argument
439 #define CIRCLEQ_FOREACH(var, head, field) \ argument
442 (var) = CIRCLEQ_NEXT(var, field))
444 #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ argument
447 (var) = CIRCLEQ_PREV(var, field))
457 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
458 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
459 (elm)->field.cqe_prev = (listelm); \
460 if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
463 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
464 (listelm)->field.cqe_next = (elm); \
467 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ argument
468 (elm)->field.cqe_next = (listelm); \
469 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
470 if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
473 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
474 (listelm)->field.cqe_prev = (elm); \
477 #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ argument
478 (elm)->field.cqe_next = (head)->cqh_first; \
479 (elm)->field.cqe_prev = CIRCLEQ_END(head); \
483 (head)->cqh_first->field.cqe_prev = (elm); \
487 #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ argument
488 (elm)->field.cqe_next = CIRCLEQ_END(head); \
489 (elm)->field.cqe_prev = (head)->cqh_last; \
493 (head)->cqh_last->field.cqe_next = (elm); \
497 #define CIRCLEQ_REMOVE(head, elm, field) do { \ argument
498 if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
499 (head)->cqh_last = (elm)->field.cqe_prev; \
501 (elm)->field.cqe_next->field.cqe_prev = \
502 (elm)->field.cqe_prev; \
503 if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
504 (head)->cqh_first = (elm)->field.cqe_next; \
506 (elm)->field.cqe_prev->field.cqe_next = \
507 (elm)->field.cqe_next; \
508 _Q_INVALIDATE((elm)->field.cqe_prev); \
509 _Q_INVALIDATE((elm)->field.cqe_next); \
512 #define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \ argument
513 if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \
517 (elm2)->field.cqe_next->field.cqe_prev = (elm2); \
518 if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \
522 (elm2)->field.cqe_prev->field.cqe_next = (elm2); \
523 _Q_INVALIDATE((elm)->field.cqe_prev); \
524 _Q_INVALIDATE((elm)->field.cqe_next); \