Lines Matching refs:listhead

8  * the listhead and per-entry next fields are declared as pointers to
19 * LINK_SLIST(listhead, pentry, nextlink)
22 * LINK_TAIL_SLIST(listhead, pentry, nextlink, entrytype)
26 * LINK_SORT_SLIST(listhead, pentry, beforecur, nextlink, entrytype)
33 * UNLINK_HEAD_SLIST(punlinked, listhead, nextlink)
37 * UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, entrytype)
42 * UNLINK_EXPR_SLIST(punlinked, listhead, expr, nextlink, entrytype)
59 * a variable to refer to a FIFO queue (similar to listhead). The
101 * by the listhead, which is the same type as elements for simplicity.
102 * An empty list's listhead has both links set to its own address.
128 #define LINK_SLIST(listhead, pentry, nextlink) \
130 (pentry)->nextlink = (listhead); \
131 (listhead) = (pentry); \
134 #define LINK_TAIL_SLIST(listhead, pentry, nextlink, entrytype) \
138 pptail = &(listhead); \
149 #define LINK_SORT_SLIST(listhead, pentry, beforecur, nextlink, \
154 ppentry = &(listhead); \
170 #define UNLINK_HEAD_SLIST(punlinked, listhead, nextlink) \
172 (punlinked) = (listhead); \
174 (listhead) = (punlinked)->nextlink; \
182 #define UNLINK_EXPR_SLIST(punlinked, listhead, expr, nextlink, \
187 ppentry = &(listhead); \
207 #define UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, \
209 UNLINK_EXPR_SLIST(punlinked, listhead, (ptounlink) == \
212 #define CHECK_SLIST(listhead, nextlink, entrytype) \
216 for (pentry = (listhead); \
220 INSIST((listhead) != pentry->nextlink); \
361 #define INIT_DLIST(listhead, link) \
363 (listhead).link.f = &(listhead); \
364 (listhead).link.b = &(listhead); \
367 #define HEAD_DLIST(listhead, link) \
369 (&(listhead) != (listhead).link.f) \
370 ? (listhead).link.f \
374 #define TAIL_DLIST(listhead, link) \
376 (&(listhead) != (listhead).link.b) \
377 ? (listhead).link.b \
381 #define NEXT_DLIST(listhead, entry, link) \
383 (&(listhead) != (entry)->link.f) \
388 #define PREV_DLIST(listhead, entry, link) \
390 (&(listhead) != (entry)->link.b) \
395 #define LINK_DLIST(listhead, pentry, link) \
397 (pentry)->link.f = (listhead).link.f; \
398 (pentry)->link.b = &(listhead); \
399 (listhead).link.f->link.b = (pentry); \
400 (listhead).link.f = (pentry); \
403 #define LINK_TAIL_DLIST(listhead, pentry, link) \
405 (pentry)->link.b = (listhead).link.b; \
406 (pentry)->link.f = &(listhead); \
407 (listhead).link.b->link.f = (pentry); \
408 (listhead).link.b = (pentry); \
419 #define ITER_DLIST_BEGIN(listhead, iter, link, entrytype) \
423 for ((iter) = (listhead).link.f; \
424 (iter) != &(listhead) \
431 #define REV_ITER_DLIST_BEGIN(listhead, iter, link, entrytype) \
435 for ((iter) = (listhead).link.b; \
436 (iter) != &(listhead) \