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_FROM(var, head, field) \ argument
157 for ((var) = ((var) != NULL ? (var) : CK_SLIST_FIRST((head))); \
161 #define CK_SLIST_FOREACH_SAFE(var, head, field, tvar) \ argument
162 for ((var) = CK_SLIST_FIRST(head); \
166 #define CK_SLIST_FOREACH_PREVPTR(var, varp, head, field) \ argument
167 for ((varp) = &(head)->cslh_first; \
171 #define CK_SLIST_INIT(head) do { \ argument
172 ck_pr_store_ptr(&(head)->cslh_first, NULL); \
182 #define CK_SLIST_INSERT_HEAD(head, elm, field) do { \ argument
183 (elm)->field.csle_next = (head)->cslh_first; \
185 ck_pr_store_ptr(&(head)->cslh_first, elm); \
199 #define CK_SLIST_REMOVE(head, elm, type, field) do { \ argument
200 if ((head)->cslh_first == (elm)) { \
201 CK_SLIST_REMOVE_HEAD((head), field); \
203 struct type *curelm = (head)->cslh_first; \
210 #define CK_SLIST_REMOVE_HEAD(head, field) do { \ argument
211 ck_pr_store_ptr(&(head)->cslh_first, \
212 (head)->cslh_first->field.csle_next); \
241 #define CK_STAILQ_HEAD_INITIALIZER(head) \ argument
242 { NULL, &(head).cstqh_first }
261 #define CK_STAILQ_EMPTY(head) (ck_pr_load_ptr(&(head)->cstqh_first) == NULL) argument
263 #define CK_STAILQ_FIRST(head) (ck_pr_load_ptr(&(head)->cstqh_first)) argument
265 #define CK_STAILQ_FOREACH(var, head, field) \ argument
266 for((var) = CK_STAILQ_FIRST((head)); \
270 #define CK_STAILQ_FOREACH_FROM(var, head, field) \ argument
271 for ((var) = ((var) != NULL ? (var) : CK_STAILQ_FIRST((head))); \
275 #define CK_STAILQ_FOREACH_SAFE(var, head, field, tvar) \ argument
276 for ((var) = CK_STAILQ_FIRST((head)); \
281 #define CK_STAILQ_INIT(head) do { \ argument
282 ck_pr_store_ptr(&(head)->cstqh_first, NULL); \
284 (head)->cstqh_last = &(head)->cstqh_first; \
287 #define CK_STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ argument
292 (head)->cstqh_last = &(elm)->field.cstqe_next; \
295 #define CK_STAILQ_INSERT_HEAD(head, elm, field) do { \ argument
296 (elm)->field.cstqe_next = (head)->cstqh_first; \
298 ck_pr_store_ptr(&(head)->cstqh_first, elm); \
300 (head)->cstqh_last = &(elm)->field.cstqe_next; \
303 #define CK_STAILQ_INSERT_TAIL(head, elm, field) do { \ argument
306 ck_pr_store_ptr((head)->cstqh_last, (elm)); \
307 (head)->cstqh_last = &(elm)->field.cstqe_next; \
313 #define CK_STAILQ_REMOVE(head, elm, type, field) do { \ argument
314 if ((head)->cstqh_first == (elm)) { \
315 CK_STAILQ_REMOVE_HEAD((head), field); \
317 struct type *curelm = (head)->cstqh_first; \
320 CK_STAILQ_REMOVE_AFTER(head, curelm, field); \
324 #define CK_STAILQ_REMOVE_AFTER(head, elm, field) do { \ argument
328 (head)->cstqh_last = &(elm)->field.cstqe_next; \
331 #define CK_STAILQ_REMOVE_HEAD(head, field) do { \ argument
332 ck_pr_store_ptr(&(head)->cstqh_first, \
333 (head)->cstqh_first->field.cstqe_next); \
334 if ((head)->cstqh_first == NULL) \
335 (head)->cstqh_last = &(head)->cstqh_first; \
369 #define CK_LIST_HEAD_INITIALIZER(head) \ argument
378 #define CK_LIST_FIRST(head) ck_pr_load_ptr(&(head)->clh_first) argument
379 #define CK_LIST_EMPTY(head) (CK_LIST_FIRST(head) == NULL) argument
382 #define CK_LIST_FOREACH(var, head, field) \ argument
383 for ((var) = CK_LIST_FIRST((head)); \
387 #define CK_LIST_FOREACH_FROM(var, head, field) \ argument
388 for ((var) = ((var) != NULL ? (var) : CK_LIST_FIRST((head))); \
392 #define CK_LIST_FOREACH_SAFE(var, head, field, tvar) \ argument
393 for ((var) = CK_LIST_FIRST((head)); \
397 #define CK_LIST_INIT(head) do { \ argument
398 ck_pr_store_ptr(&(head)->clh_first, NULL); \
419 #define CK_LIST_INSERT_HEAD(head, elm, field) do { \ argument
420 (elm)->field.cle_next = (head)->clh_first; \
423 (head)->clh_first->field.cle_prev = &(elm)->field.cle_next; \
424 ck_pr_store_ptr(&(head)->clh_first, elm); \
425 (elm)->field.cle_prev = &(head)->clh_first; \