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, \
184 if (NULL != (listhead)) { \
187 ppentry = &(listhead); \
209 #define UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, \
211 UNLINK_EXPR_SLIST(punlinked, listhead, (ptounlink) == \
214 #define CHECK_SLIST(listhead, nextlink, entrytype) \
218 for (pentry = (listhead); \
222 INSIST((listhead) != pentry->nextlink); \
363 #define INIT_DLIST(listhead, link) \
365 (listhead).link.f = &(listhead); \
366 (listhead).link.b = &(listhead); \
369 #define HEAD_DLIST(listhead, link) \
371 (&(listhead) != (listhead).link.f) \
372 ? (listhead).link.f \
376 #define TAIL_DLIST(listhead, link) \
378 (&(listhead) != (listhead).link.b) \
379 ? (listhead).link.b \
383 #define NEXT_DLIST(listhead, entry, link) \
385 (&(listhead) != (entry)->link.f) \
390 #define PREV_DLIST(listhead, entry, link) \
392 (&(listhead) != (entry)->link.b) \
397 #define LINK_DLIST(listhead, pentry, link) \
399 (pentry)->link.f = (listhead).link.f; \
400 (pentry)->link.b = &(listhead); \
401 (listhead).link.f->link.b = (pentry); \
402 (listhead).link.f = (pentry); \
405 #define LINK_TAIL_DLIST(listhead, pentry, link) \
407 (pentry)->link.b = (listhead).link.b; \
408 (pentry)->link.f = &(listhead); \
409 (listhead).link.b->link.f = (pentry); \
410 (listhead).link.b = (pentry); \
421 #define ITER_DLIST_BEGIN(listhead, iter, link, entrytype) \
425 for ((iter) = (listhead).link.f; \
426 (iter) != &(listhead) \
433 #define REV_ITER_DLIST_BEGIN(listhead, iter, link, entrytype) \
437 for ((iter) = (listhead).link.b; \
438 (iter) != &(listhead) \