Lines Matching refs:head
131 #define CK_SLIST_HEAD_INITIALIZER(head) \ argument
142 #define CK_SLIST_EMPTY(head) \ argument
143 (ck_pr_load_ptr(&(head)->cslh_first) == NULL)
145 #define CK_SLIST_FIRST(head) \ argument
146 (ck_pr_load_ptr(&(head)->cslh_first))
151 #define CK_SLIST_FOREACH(var, head, field) \ argument
152 for ((var) = CK_SLIST_FIRST((head)); \
156 #define CK_SLIST_FOREACH_SAFE(var, head, field, tvar) \ argument
157 for ((var) = CK_SLIST_FIRST(head); \
161 #define CK_SLIST_FOREACH_PREVPTR(var, varp, head, field) \ argument
162 for ((varp) = &(head)->cslh_first; \
166 #define CK_SLIST_INIT(head) do { \ argument
167 ck_pr_store_ptr(&(head)->cslh_first, NULL); \
177 #define CK_SLIST_INSERT_HEAD(head, elm, field) do { \ argument
178 (elm)->field.csle_next = (head)->cslh_first; \
180 ck_pr_store_ptr(&(head)->cslh_first, elm); \
194 #define CK_SLIST_REMOVE(head, elm, type, field) do { \ argument
195 if ((head)->cslh_first == (elm)) { \
196 CK_SLIST_REMOVE_HEAD((head), field); \
198 struct type *curelm = (head)->cslh_first; \
205 #define CK_SLIST_REMOVE_HEAD(head, field) do { \ argument
206 ck_pr_store_ptr(&(head)->cslh_first, \
207 (head)->cslh_first->field.csle_next); \
236 #define CK_STAILQ_HEAD_INITIALIZER(head) \ argument
237 { NULL, &(head).cstqh_first }
256 #define CK_STAILQ_EMPTY(head) (ck_pr_load_ptr(&(head)->cstqh_first) == NULL) argument
258 #define CK_STAILQ_FIRST(head) (ck_pr_load_ptr(&(head)->cstqh_first)) argument
260 #define CK_STAILQ_FOREACH(var, head, field) \ argument
261 for((var) = CK_STAILQ_FIRST((head)); \
265 #define CK_STAILQ_FOREACH_SAFE(var, head, field, tvar) \ argument
266 for ((var) = CK_STAILQ_FIRST((head)); \
271 #define CK_STAILQ_INIT(head) do { \ argument
272 ck_pr_store_ptr(&(head)->cstqh_first, NULL); \
274 (head)->cstqh_last = &(head)->cstqh_first; \
277 #define CK_STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ argument
282 (head)->cstqh_last = &(elm)->field.cstqe_next; \
285 #define CK_STAILQ_INSERT_HEAD(head, elm, field) do { \ argument
286 (elm)->field.cstqe_next = (head)->cstqh_first; \
288 ck_pr_store_ptr(&(head)->cstqh_first, elm); \
290 (head)->cstqh_last = &(elm)->field.cstqe_next; \
293 #define CK_STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
296 ck_pr_store_ptr((head)->cstqh_last, (elm)); \
297 (head)->cstqh_last = &(elm)->field.cstqe_next; \
303 #define CK_STAILQ_REMOVE(head, elm, type, field) do { \ argument
304 if ((head)->cstqh_first == (elm)) { \
305 CK_STAILQ_REMOVE_HEAD((head), field); \
307 struct type *curelm = (head)->cstqh_first; \
310 CK_STAILQ_REMOVE_AFTER(head, curelm, field); \
314 #define CK_STAILQ_REMOVE_AFTER(head, elm, field) do { \ argument
318 (head)->cstqh_last = &(elm)->field.cstqe_next; \
321 #define CK_STAILQ_REMOVE_HEAD(head, field) do { \ argument
322 ck_pr_store_ptr(&(head)->cstqh_first, \
323 (head)->cstqh_first->field.cstqe_next); \
324 if ((head)->cstqh_first == NULL) \
325 (head)->cstqh_last = &(head)->cstqh_first; \
359 #define CK_LIST_HEAD_INITIALIZER(head) \ argument
368 #define CK_LIST_FIRST(head) ck_pr_load_ptr(&(head)->clh_first) argument
369 #define CK_LIST_EMPTY(head) (CK_LIST_FIRST(head) == NULL) argument
372 #define CK_LIST_FOREACH(var, head, field) \ argument
373 for ((var) = CK_LIST_FIRST((head)); \
377 #define CK_LIST_FOREACH_SAFE(var, head, field, tvar) \ argument
378 for ((var) = CK_LIST_FIRST((head)); \
382 #define CK_LIST_INIT(head) do { \ argument
383 ck_pr_store_ptr(&(head)->clh_first, NULL); \
404 #define CK_LIST_INSERT_HEAD(head, elm, field) do { \ argument
405 (elm)->field.cle_next = (head)->clh_first; \
408 (head)->clh_first->field.cle_prev = &(elm)->field.cle_next; \
409 ck_pr_store_ptr(&(head)->clh_first, elm); \
410 (elm)->field.cle_prev = &(head)->clh_first; \