Home | History | Annotate | Download | only in qemu

Lines Matching refs:elm

103 #define QLIST_INSERT_AFTER(listelm, elm, field) do {                    \
104 if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
106 &(elm)->field.le_next; \
107 (listelm)->field.le_next = (elm); \
108 (elm)->field.le_prev = &(listelm)->field.le_next; \
111 #define QLIST_INSERT_BEFORE(listelm, elm, field) do { \
112 (elm)->field.le_prev = (listelm)->field.le_prev; \
113 (elm)->field.le_next = (listelm); \
114 *(listelm)->field.le_prev = (elm); \
115 (listelm)->field.le_prev = &(elm)->field.le_next; \
118 #define QLIST_INSERT_HEAD(head, elm, field) do { \
119 if (((elm)->field.le_next = (head)->lh_first) != NULL) \
120 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
121 (head)->lh_first = (elm); \
122 (elm)->field.le_prev = &(head)->lh_first; \
125 #define QLIST_REMOVE(elm, field) do { \
126 if ((elm)->field.le_next != NULL) \
127 (elm)->field.le_next->field.le_prev = \
128 (elm)->field.le_prev; \
129 *(elm)->field.le_prev = (elm)->field.le_next; \
147 #define QLIST_NEXT(elm, field) ((elm)->field.le_next)
175 #define QSIMPLEQ_INSERT_HEAD(head, elm, field) do { \
176 if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
177 (head)->sqh_last = &(elm)->field.sqe_next; \
178 (head)->sqh_first = (elm); \
181 #define QSIMPLEQ_INSERT_TAIL(head, elm, field) do { \
182 (elm)->field.sqe_next = NULL; \
183 *(head)->sqh_last = (elm); \
184 (head)->sqh_last = &(elm)->field.sqe_next; \
187 #define QSIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
188 if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL) \
189 (head)->sqh_last = &(elm)->field.sqe_next; \
190 (listelm)->field.sqe_next = (elm); \
198 #define QSIMPLEQ_REMOVE(head, elm, type, field) do { \
199 if ((head)->sqh_first == (elm)) { \
203 while (curelm->field.sqe_next != (elm)) \
240 #define QSIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
271 #define QTAILQ_INSERT_HEAD(head, elm, field) do { \
272 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
274 &(elm)->field.tqe_next; \
276 (head)->tqh_last = &(elm)->field.tqe_next; \
277 (head)->tqh_first = (elm); \
278 (elm)->field.tqe_prev = &(head)->tqh_first; \
281 #define QTAILQ_INSERT_TAIL(head, elm, field) do { \
282 (elm)->field.tqe_next = NULL; \
283 (elm)->field.tqe_prev = (head)->tqh_last; \
284 *(head)->tqh_last = (elm); \
285 (head)->tqh_last = &(elm)->field.tqe_next; \
288 #define QTAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
289 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
290 (elm)->field.tqe_next->field.tqe_prev = \
291 &(elm)->field.tqe_next; \
293 (head)->tqh_last = &(elm)->field.tqe_next; \
294 (listelm)->field.tqe_next = (elm); \
295 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
298 #define QTAILQ_INSERT_BEFORE(listelm, elm, field) do { \
299 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
300 (elm)->field.tqe_next = (listelm); \
301 *(listelm)->field.tqe_prev = (elm); \
302 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
305 #define QTAILQ_REMOVE(head, elm, field) do { \
306 if (((elm)->field.tqe_next) != NULL) \
307 (elm)->field.tqe_next->field.tqe_prev = \
308 (elm)->field.tqe_prev; \
310 (head)->tqh_last = (elm)->field.tqe_prev; \
311 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
334 #define QTAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
338 #define QTAILQ_PREV(elm, headname, field) \
339 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
368 #define QCIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
369 (elm)->field.cqe_next = (listelm)->field.cqe_next; \
370 (elm)->field.cqe_prev = (listelm); \
372 (head)->cqh_last = (elm); \
374 (listelm)->field.cqe_next->field.cqe_prev = (elm); \
375 (listelm)->field.cqe_next = (elm); \
378 #define QCIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
379 (elm)->field.cqe_next = (listelm); \
380 (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
382 (head)->cqh_first = (elm); \
384 (listelm)->field.cqe_prev->field.cqe_next = (elm); \
385 (listelm)->field.cqe_prev = (elm); \
388 #define QCIRCLEQ_INSERT_HEAD(head, elm, field) do { \
389 (elm)->field.cqe_next = (head)->cqh_first; \
390 (elm)->field.cqe_prev = (void *)(head); \
392 (head)->cqh_last = (elm); \
394 (head)->cqh_first->field.cqe_prev = (elm); \
395 (head)->cqh_first = (elm); \
398 #define QCIRCLEQ_INSERT_TAIL(head, elm, field) do { \
399 (elm)->field.cqe_next = (void *)(head); \
400 (elm)->field.cqe_prev = (head)->cqh_last; \
402 (head)->cqh_first = (elm); \
404 (head)->cqh_last->field.cqe_next = (elm); \
405 (head)->cqh_last = (elm); \
408 #define QCIRCLEQ_REMOVE(head, elm, field) do { \
409 if ((elm)->field.cqe_next == (void *)(head)) \
410 (head)->cqh_last = (elm)->field.cqe_prev; \
412 (elm)->field.cqe_next->field.cqe_prev = \
413 (elm)->field.cqe_prev; \
414 if ((elm)->field.cqe_prev == (void *)(head)) \
415 (head)->cqh_first = (elm)->field.cqe_next; \
417 (elm)->field.cqe_prev->field.cqe_next = \
418 (elm)->field.cqe_next; \
437 #define QCIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
438 #define QCIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
440 #define QCIRCLEQ_LOOP_NEXT(head, elm, field) \
441 (((elm)->field.cqe_next == (void *)(head)) \
443 : (elm->field.cqe_next))
444 #define QCIRCLEQ_LOOP_PREV(head, elm, field) \
445 (((elm)->field.cqe_prev == (void *)(head)) \
447 : (elm->field.cqe_prev))