Lines Matching refs:head

65 #define SM_TAILQ_HEAD_INITIALIZER(head)					\  argument
66 { NULL, &(head).tqh_first }
77 #define SM_TAILQ_FIRST(head) ((head)->tqh_first) argument
78 #define SM_TAILQ_END(head) NULL argument
80 #define SM_TAILQ_LAST(head, headname) \ argument
81 (*(((struct headname *)((head)->tqh_last))->tqh_last))
85 #define SM_TAILQ_EMPTY(head) \ argument
86 (SM_TAILQ_FIRST(head) == SM_TAILQ_END(head))
88 #define SM_TAILQ_FOREACH(var, head, field) \ argument
89 for((var) = SM_TAILQ_FIRST(head); \
90 (var) != SM_TAILQ_END(head); \
93 #define SM_TAILQ_FOREACH_REVERSE(var, head, headname, field) \ argument
94 for((var) = SM_TAILQ_LAST(head, headname); \
95 (var) != SM_TAILQ_END(head); \
101 #define SM_TAILQ_INIT(head) do { \ argument
102 (head)->tqh_first = NULL; \
103 (head)->tqh_last = &(head)->tqh_first; \
106 #define SM_TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
107 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
108 (head)->tqh_first->field.tqe_prev = \
111 (head)->tqh_last = &(elm)->field.tqe_next; \
112 (head)->tqh_first = (elm); \
113 (elm)->field.tqe_prev = &(head)->tqh_first; \
116 #define SM_TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
118 (elm)->field.tqe_prev = (head)->tqh_last; \
119 *(head)->tqh_last = (elm); \
120 (head)->tqh_last = &(elm)->field.tqe_next; \
123 #define SM_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
128 (head)->tqh_last = &(elm)->field.tqe_next; \
140 #define SM_TAILQ_REMOVE(head, elm, field) do { \ argument
145 (head)->tqh_last = (elm)->field.tqe_prev; \
149 #define SM_TAILQ_REPLACE(head, elm, elm2, field) do { \ argument
154 (head)->tqh_last = &(elm2)->field.tqe_next; \