Lines Matching refs:field

89 #define LIST_INSERT_AFTER(listelm, elm, field) {			\
90 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
91 (listelm)->field.le_next->field.le_prev = \
92 &(elm)->field.le_next; \
93 (listelm)->field.le_next = (elm); \
94 (elm)->field.le_prev = &(listelm)->field.le_next; \
97 #define LIST_INSERT_BEFORE(listelm, elm, field) { \
98 (elm)->field.le_prev = (listelm)->field.le_prev; \
99 (elm)->field.le_next = (listelm); \
100 *(listelm)->field.le_prev = (elm); \
101 (listelm)->field.le_prev = &(elm)->field.le_next; \
104 #define LIST_INSERT_HEAD(head, elm, field) { \
105 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
106 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
108 (elm)->field.le_prev = &(head)->lh_first; \
111 #define LIST_REMOVE(elm, field) { \
112 if ((elm)->field.le_next != NULL) \
113 (elm)->field.le_next->field.le_prev = \
114 (elm)->field.le_prev; \
115 *(elm)->field.le_prev = (elm)->field.le_next; \
141 #define TAILQ_INSERT_HEAD(head, elm, field) { \
142 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
143 (head)->tqh_first->field.tqe_prev = \
144 &(elm)->field.tqe_next; \
146 (head)->tqh_last = &(elm)->field.tqe_next; \
148 (elm)->field.tqe_prev = &(head)->tqh_first; \
151 #define TAILQ_INSERT_TAIL(head, elm, field) { \
152 (elm)->field.tqe_next = NULL; \
153 (elm)->field.tqe_prev = (head)->tqh_last; \
155 (head)->tqh_last = &(elm)->field.tqe_next; \
158 #define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \
159 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
160 (elm)->field.tqe_next->field.tqe_prev = \
161 &(elm)->field.tqe_next; \
163 (head)->tqh_last = &(elm)->field.tqe_next; \
164 (listelm)->field.tqe_next = (elm); \
165 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
168 #define TAILQ_INSERT_BEFORE(listelm, elm, field) { \
169 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
170 (elm)->field.tqe_next = (listelm); \
171 *(listelm)->field.tqe_prev = (elm); \
172 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
175 #define TAILQ_REMOVE(head, elm, field) { \
176 if (((elm)->field.tqe_next) != NULL) \
177 (elm)->field.tqe_next->field.tqe_prev = \
178 (elm)->field.tqe_prev; \
180 (head)->tqh_last = (elm)->field.tqe_prev; \
181 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
207 #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \
208 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
209 (elm)->field.cqe_prev = (listelm); \
210 if ((listelm)->field.cqe_next == (void *)(head)) \
213 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
214 (listelm)->field.cqe_next = (elm); \
217 #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \
218 (elm)->field.cqe_next = (listelm); \
219 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
220 if ((listelm)->field.cqe_prev == (void *)(head)) \
223 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
224 (listelm)->field.cqe_prev = (elm); \
227 #define CIRCLEQ_INSERT_HEAD(head, elm, field) { \
228 (elm)->field.cqe_next = (head)->cqh_first; \
229 (elm)->field.cqe_prev = (void *)(head); \
233 (head)->cqh_first->field.cqe_prev = (elm); \
237 #define CIRCLEQ_INSERT_TAIL(head, elm, field) { \
238 (elm)->field.cqe_next = (void *)(head); \
239 (elm)->field.cqe_prev = (head)->cqh_last; \
243 (head)->cqh_last->field.cqe_next = (elm); \
247 #define CIRCLEQ_REMOVE(head, elm, field) { \
248 if ((elm)->field.cqe_next == (void *)(head)) \
249 (head)->cqh_last = (elm)->field.cqe_prev; \
251 (elm)->field.cqe_next->field.cqe_prev = \
252 (elm)->field.cqe_prev; \
253 if ((elm)->field.cqe_prev == (void *)(head)) \
254 (head)->cqh_first = (elm)->field.cqe_next; \
256 (elm)->field.cqe_prev->field.cqe_next = \
257 (elm)->field.cqe_next; \