Lines Matching refs:head
30 /* Doubly linked list with head and tail */
31 #define DLLIST2_PREPEND_FULL(head, tail, item, prev, next) STMT_START { \
33 (item)->next = *(head); \
34 if (*(head) != NULL) (*(head))->prev = (item); else (*tail) = (item); \
35 *(head) = (item); \
38 #define DLLIST2_PREPEND(head, tail, item) \
39 DLLIST2_PREPEND_FULL(head, tail, item, prev, next)
41 #define DLLIST2_APPEND_FULL(head, tail, item, prev, next) STMT_START { \
44 if (*(tail) != NULL) (*(tail))->next = (item); else (*head) = (item); \
48 #define DLLIST2_APPEND(head, tail, item) \
49 DLLIST2_APPEND_FULL(head, tail, item, prev, next)
51 #define DLLIST2_INSERT_AFTER_FULL(head, tail, after, item, prev, next) \
62 #define DLLIST2_INSERT_AFTER(head, tail, after, item) \
63 DLLIST2_INSERT_AFTER_FULL(head, tail, after, item, prev, next)
65 #define DLLIST2_REMOVE_FULL(head, tail, item, prev, next) STMT_START { \
68 else if (*(head) == item) \
69 *(head) = (item)->next; \
78 #define DLLIST2_REMOVE(head, tail, item) \
79 DLLIST2_REMOVE_FULL(head, tail, item, prev, next)