Lines Matching refs:field

101 #define LIST_INSERT_AFTER(listelm, elm, field) {			\  argument
102 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
103 (listelm)->field.le_next->field.le_prev = \
104 &(elm)->field.le_next; \
105 (listelm)->field.le_next = (elm); \
106 (elm)->field.le_prev = &(listelm)->field.le_next; \
109 #define LIST_INSERT_HEAD(head, elm, field) { \ argument
110 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
111 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
113 (elm)->field.le_prev = &(head)->lh_first; \
116 #define LIST_REMOVE(elm, field) { \ argument
117 if ((elm)->field.le_next != NULL) \
118 (elm)->field.le_next->field.le_prev = \
119 (elm)->field.le_prev; \
120 *(elm)->field.le_prev = (elm)->field.le_next; \
146 #define TAILQ_INSERT_HEAD(head, elm, field) { \ argument
147 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
148 (elm)->field.tqe_next->field.tqe_prev = \
149 &(elm)->field.tqe_next; \
151 (head)->tqh_last = &(elm)->field.tqe_next; \
153 (elm)->field.tqe_prev = &(head)->tqh_first; \
156 #define TAILQ_INSERT_TAIL(head, elm, field) { \ argument
157 (elm)->field.tqe_next = NULL; \
158 (elm)->field.tqe_prev = (head)->tqh_last; \
160 (head)->tqh_last = &(elm)->field.tqe_next; \
163 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \ argument
164 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
165 (elm)->field.tqe_next->field.tqe_prev = \
166 &(elm)->field.tqe_next; \
168 (head)->tqh_last = &(elm)->field.tqe_next; \
169 (listelm)->field.tqe_next = (elm); \
170 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
173 #define TAILQ_REMOVE(head, elm, field) { \ argument
174 if (((elm)->field.tqe_next) != NULL) \
175 (elm)->field.tqe_next->field.tqe_prev = \
176 (elm)->field.tqe_prev; \
178 (head)->tqh_last = (elm)->field.tqe_prev; \
179 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
205 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \ argument
206 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
207 (elm)->field.cqe_prev = (listelm); \
208 if ((listelm)->field.cqe_next == (void *)(head)) \
211 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
212 (listelm)->field.cqe_next = (elm); \
215 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \ argument
216 (elm)->field.cqe_next = (listelm); \
217 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
218 if ((listelm)->field.cqe_prev == (void *)(head)) \
221 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
222 (listelm)->field.cqe_prev = (elm); \
225 #define CIRCLEQ_INSERT_HEAD(head, elm, field) { \ argument
226 (elm)->field.cqe_next = (head)->cqh_first; \
227 (elm)->field.cqe_prev = (void *)(head); \
231 (head)->cqh_first->field.cqe_prev = (elm); \
235 #define CIRCLEQ_INSERT_TAIL(head, elm, field) { \ argument
236 (elm)->field.cqe_next = (void *)(head); \
237 (elm)->field.cqe_prev = (head)->cqh_last; \
241 (head)->cqh_last->field.cqe_next = (elm); \
245 #define CIRCLEQ_REMOVE(head, elm, field) { \ argument
246 if ((elm)->field.cqe_next == (void *)(head)) \
247 (head)->cqh_last = (elm)->field.cqe_prev; \
249 (elm)->field.cqe_next->field.cqe_prev = \
250 (elm)->field.cqe_prev; \
251 if ((elm)->field.cqe_prev == (void *)(head)) \
252 (head)->cqh_first = (elm)->field.cqe_next; \
254 (elm)->field.cqe_prev->field.cqe_next = \
255 (elm)->field.cqe_next; \