Lines Matching full:elm
59 #define QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD(head, elm, field) \ argument
63 #define QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL(head, elm, field) \ argument
66 #define QUEUEDEBUG_HEIM_TAILQ_OP(elm, field) \ argument
67 if ((elm)->field.tqe_next && \
68 (elm)->field.tqe_next->field.tqe_prev != \
69 &(elm)->field.tqe_next) \
70 panic("HEIM_TAILQ_* forw %p %s:%d", (elm), __FILE__, __LINE__);\
71 if (*(elm)->field.tqe_prev != (elm)) \
72 panic("HEIM_TAILQ_* back %p %s:%d", (elm), __FILE__, __LINE__);
73 #define QUEUEDEBUG_HEIM_TAILQ_PREREMOVE(head, elm, field) \ argument
74 if ((elm)->field.tqe_next == NULL && \
75 (head)->tqh_last != &(elm)->field.tqe_next) \
76 panic("HEIM_TAILQ_PREREMOVE head %p elm %p %s:%d", \
77 (head), (elm), __FILE__, __LINE__);
78 #define QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE(elm, field) \ argument
79 (elm)->field.tqe_next = (void *)1L; \
80 (elm)->field.tqe_prev = (void *)1L;
82 #define QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD(head, elm, field) argument
83 #define QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL(head, elm, field) argument
84 #define QUEUEDEBUG_HEIM_TAILQ_OP(elm, field) argument
85 #define QUEUEDEBUG_HEIM_TAILQ_PREREMOVE(head, elm, field) argument
86 #define QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE(elm, field) argument
94 #define HEIM_TAILQ_INSERT_HEAD(head, elm, field) do { \ argument
95 QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD((head), (elm), field) \
96 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
98 &(elm)->field.tqe_next; \
100 (head)->tqh_last = &(elm)->field.tqe_next; \
101 (head)->tqh_first = (elm); \
102 (elm)->field.tqe_prev = &(head)->tqh_first; \
105 #define HEIM_TAILQ_INSERT_TAIL(head, elm, field) do { \ argument
106 QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL((head), (elm), field) \
107 (elm)->field.tqe_next = NULL; \
108 (elm)->field.tqe_prev = (head)->tqh_last; \
109 *(head)->tqh_last = (elm); \
110 (head)->tqh_last = &(elm)->field.tqe_next; \
113 #define HEIM_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
115 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
116 (elm)->field.tqe_next->field.tqe_prev = \
117 &(elm)->field.tqe_next; \
119 (head)->tqh_last = &(elm)->field.tqe_next; \
120 (listelm)->field.tqe_next = (elm); \
121 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
124 #define HEIM_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
126 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
127 (elm)->field.tqe_next = (listelm); \
128 *(listelm)->field.tqe_prev = (elm); \
129 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
132 #define HEIM_TAILQ_REMOVE(head, elm, field) do { \ argument
133 QUEUEDEBUG_HEIM_TAILQ_PREREMOVE((head), (elm), field) \
134 QUEUEDEBUG_HEIM_TAILQ_OP((elm), field) \
135 if (((elm)->field.tqe_next) != NULL) \
136 (elm)->field.tqe_next->field.tqe_prev = \
137 (elm)->field.tqe_prev; \
139 (head)->tqh_last = (elm)->field.tqe_prev; \
140 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
141 QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE((elm), field); \
159 #define HEIM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) argument
163 #define HEIM_TAILQ_PREV(elm, headname, field) \ argument
164 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))