Home | History | Annotate | Download | only in linux

Lines Matching refs:HEAD

61 INIT_LIST_HEAD(struct list_head *head)
63 head->prev = head;
64 head->next = head;
68 list_first(const struct list_head *head)
70 return head->next;
74 list_last(const struct list_head *head)
76 return head->prev;
92 list_empty(const struct list_head *head)
94 return (head->next == head);
98 list_is_singular(const struct list_head *head)
101 if (list_empty(head))
103 if (head->next != head->prev)
109 list_is_first(const struct list_head *entry, const struct list_head *head)
111 return head == entry->prev;
115 list_is_last(const struct list_head *entry, const struct list_head *head)
117 return head == entry->next;
131 list_add(struct list_head *node, struct list_head *head)
133 __list_add_between(head, node, head->next);
137 list_add_rcu(struct list_head *node, struct list_head *head)
139 struct list_head *next = head->next;
143 node->prev = head;
146 atomic_store_release(&head->next, node);
153 list_add_tail(struct list_head *node, struct list_head *head)
155 __list_add_between(head->prev, node, head);
188 list_splice(const struct list_head *list, struct list_head *head)
191 __list_splice_between(head, list, head->next);
195 list_splice_init(struct list_head *list, struct list_head *head)
198 __list_splice_between(head, list, head->next);
204 list_splice_tail(const struct list_head *list, struct list_head *head)
207 __list_splice_between(head->prev, list, head);
211 list_splice_tail_init(struct list_head *list, struct list_head *head)
214 __list_splice_between(head->prev, list, head);
220 list_move(struct list_head *node, struct list_head *head)
223 list_add(node, head);
227 list_move_tail(struct list_head *node, struct list_head *head)
230 list_add_tail(node, head);
234 list_bulk_move_tail(struct list_head *head, struct list_head *first,
241 head->prev->next = first;
242 first->prev = head->prev;
244 last->next = head;
245 head->prev = last;
283 #define list_for_each(VAR, HEAD) \
284 for ((VAR) = list_first((HEAD)); \
285 (VAR) != (HEAD); \
288 #define list_for_each_prev(VAR, HEAD) \
289 for ((VAR) = list_last((HEAD)); \
290 (VAR) != (HEAD); \
293 #define list_for_each_safe(VAR, NEXT, HEAD) \
294 for ((VAR) = list_first((HEAD)); \
295 ((VAR) != (HEAD)) && ((NEXT) = list_next((VAR)), 1); \
301 #define list_for_each_entry(VAR, HEAD, FIELD) \
302 for ((VAR) = list_entry(list_first((HEAD)), typeof(*(VAR)), FIELD); \
303 &(VAR)->FIELD != (HEAD); \
307 #define list_for_each_entry_safe(VAR, NEXT, HEAD, FIELD) \
308 for ((VAR) = list_entry(list_first((HEAD)), typeof(*(VAR)), FIELD); \
309 (&(VAR)->FIELD != (HEAD)) && \
314 #define list_for_each_entry_safe_reverse(VAR, NEXT, HEAD, FIELD) \
315 for ((VAR) = list_entry(list_last((HEAD)), typeof(*(VAR)), FIELD); \
316 (&(VAR)->FIELD != (HEAD)) && \
321 #define list_for_each_entry_reverse(VAR, HEAD, FIELD) \
322 for ((VAR) = list_entry(list_last((HEAD)), typeof(*(VAR)), FIELD); \
323 &(VAR)->FIELD != (HEAD); \
327 #define list_for_each_entry_continue(VAR, HEAD, FIELD) \
329 &(VAR)->FIELD != (HEAD); \
332 #define list_for_each_entry_continue_reverse(VAR, HEAD, FIELD) \
334 &(VAR)->FIELD != (HEAD); \
337 #define list_for_each_entry_from(VAR, HEAD, FIELD) \
339 (&(VAR)->FIELD != (HEAD)); \
342 #define list_for_each_entry_from_reverse(VAR, HEAD, FIELD) \
344 (&(VAR)->FIELD != (HEAD)); \
347 #define list_for_each_entry_safe_from(VAR, NEXT, HEAD, FIELD) \
349 (&(VAR)->FIELD != (HEAD)) && \
367 hlist_add_head(struct hlist_node *node, struct hlist_head *head)
371 pslist_writer_insert_head(head, node);
393 #define hlist_for_each(VAR, HEAD) \
394 for ((VAR) = hlist_first(HEAD); (VAR) != NULL; (VAR) = hlist_next(VAR))
395 #define hlist_for_each_safe(VAR, NEXT, HEAD) \
396 for ((VAR) = hlist_first(HEAD); \
397 (VAR) != NULL && ((NEXT) = hlist_next(HEAD), 1); \
399 #define hlist_for_each_entry(VAR, HEAD, FIELD) \
400 for ((VAR) = (hlist_first(HEAD) == NULL ? NULL : \
401 hlist_entry(hlist_first(HEAD), typeof(*(VAR)), \
408 #define hlist_for_each_entry_safe(VAR, NEXT, HEAD, FIELD) \
409 for ((VAR) = (hlist_first(HEAD) == NULL ? NULL : \
410 hlist_entry(hlist_first(HEAD), typeof(*(VAR)), \
425 hlist_add_head_rcu(struct hlist_node *node, struct hlist_head *head)
429 pslist_writer_insert_head(head, node);
437 #define hlist_for_each_entry_rcu(VAR, HEAD, FIELD) \
438 for ((VAR) = (hlist_first_rcu(HEAD) == NULL ? NULL : \
439 hlist_entry(hlist_first_rcu(HEAD), typeof(*(VAR)), \