Lines Matching full:anchor

60  *	anchor contains the head and indirect tail pointers.  Example:
81 * HEAD_FIFO(anchor)
82 * TAIL_FIFO(anchor)
85 * LINK_FIFO(anchor, pentry, nextlink)
88 * UNLINK_FIFO(punlinked, anchor, nextlink)
236 #define HEAD_FIFO(anchor) ((anchor).phead)
237 #define TAIL_FIFO(anchor) ((NULL == (anchor).pptail) \
239 : *((anchor).pptail))
242 * For DEBUG builds only, verify both or neither of the anchor pointers
246 #define CHECK_FIFO_CONSISTENCY(anchor) do { } while (FALSE)
248 #define CHECK_FIFO_CONSISTENCY(anchor) \
249 check_gen_fifo_consistency(&(anchor))
266 #define LINK_FIFO(anchor, pentry, nextlink) \
268 CHECK_FIFO_CONSISTENCY(anchor); \
271 if (NULL != (anchor).pptail) { \
272 (*((anchor).pptail))->nextlink = (pentry); \
273 (anchor).pptail = \
274 &(*((anchor).pptail))->nextlink; \
276 (anchor).phead = (pentry); \
277 (anchor).pptail = &(anchor).phead; \
280 CHECK_FIFO_CONSISTENCY(anchor); \
283 #define UNLINK_FIFO(punlinked, anchor, nextlink) \
285 CHECK_FIFO_CONSISTENCY(anchor); \
287 (punlinked) = (anchor).phead; \
289 (anchor).phead = (punlinked)->nextlink; \
290 if (NULL == (anchor).phead) \
291 (anchor).pptail = NULL; \
292 else if ((anchor).pptail == \
294 (anchor).pptail = &(anchor).phead; \
296 CHECK_FIFO_CONSISTENCY(anchor); \
300 #define UNLINK_MID_FIFO(punlinked, anchor, tounlink, nextlink, \
305 CHECK_FIFO_CONSISTENCY(anchor); \
307 ppentry = &(anchor).phead; \
321 (anchor).pptail = NULL; \
322 else if ((anchor).pptail == \
324 (anchor).pptail = &(anchor).phead; \
326 CHECK_FIFO_CONSISTENCY(anchor); \