Lines Matching refs:head

105 list_empty(const struct list_head *head)  in list_empty()  argument
108 return (head->next == head); in list_empty()
112 list_empty_careful(const struct list_head *head) in list_empty_careful() argument
114 struct list_head *next = head->next; in list_empty_careful()
116 return ((next == head) && (next == head->prev)); in list_empty_careful()
195 #define list_for_each(p, head) \ argument
196 for (p = (head)->next; p != (head); p = (p)->next)
198 #define list_for_each_safe(p, n, head) \ argument
199 for (p = (head)->next, n = (p)->next; p != (head); p = n, n = (p)->next)
218 #define list_for_each_entry_safe_from(pos, n, head, member) \ argument
220 &(pos)->member != (head); \
243 list_add(struct list_head *new, struct list_head *head) in list_add() argument
246 linux_list_add(new, head, head->next); in list_add()
250 list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
253 linux_list_add(new, head->prev, head); in list_add_tail()
257 list_move(struct list_head *list, struct list_head *head) in list_move() argument
261 list_add(list, head); in list_move()
265 list_move_tail(struct list_head *entry, struct list_head *head) in list_move_tail() argument
269 list_add_tail(entry, head); in list_move_tail()
273 list_rotate_to_front(struct list_head *entry, struct list_head *head) in list_rotate_to_front() argument
276 list_move_tail(entry, head); in list_rotate_to_front()
280 list_bulk_move_tail(struct list_head *head, struct list_head *first, in list_bulk_move_tail() argument
285 head->prev->next = first; in list_bulk_move_tail()
286 first->prev = head->prev; in list_bulk_move_tail()
287 last->next = head; in list_bulk_move_tail()
288 head->prev = last; in list_bulk_move_tail()
309 list_splice(const struct list_head *list, struct list_head *head) in list_splice() argument
312 linux_list_splice(list, head, head->next); in list_splice()
316 list_splice_tail(struct list_head *list, struct list_head *head) in list_splice_tail() argument
319 linux_list_splice(list, head->prev, head); in list_splice_tail()
323 list_splice_init(struct list_head *list, struct list_head *head) in list_splice_init() argument
326 linux_list_splice(list, head, head->next); in list_splice_init()
331 list_splice_tail_init(struct list_head *list, struct list_head *head) in list_splice_tail_init() argument
334 linux_list_splice(list, head->prev, head); in list_splice_tail_init()
350 #define INIT_HLIST_HEAD(head) (head)->first = NULL argument
433 static inline int list_is_singular(const struct list_head *head) in list_is_singular() argument
435 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
439 struct list_head *head, struct list_head *entry) in __list_cut_position() argument
442 list->next = head->next; in __list_cut_position()
446 head->next = new_first; in __list_cut_position()
447 new_first->prev = head; in __list_cut_position()
451 struct list_head *head, struct list_head *entry) in list_cut_position() argument
453 if (list_empty(head)) in list_cut_position()
455 if (list_is_singular(head) && in list_cut_position()
456 (head->next != entry && head != entry)) in list_cut_position()
458 if (entry == head) in list_cut_position()
461 __list_cut_position(list, head, entry); in list_cut_position()
465 const struct list_head *head) in list_is_first() argument
468 return (list->prev == head); in list_is_first()
472 const struct list_head *head) in list_is_last() argument
474 return list->next == head; in list_is_last()
479 #define hlist_for_each(p, head) \ argument
480 for (p = (head)->first; p; p = (p)->next)
482 #define hlist_for_each_safe(p, n, head) \ argument
483 for (p = (head)->first; p && ({ n = (p)->next; 1; }); p = n)
488 #define hlist_for_each_entry(pos, head, member) \ argument
489 for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
502 #define hlist_for_each_entry_safe(pos, n, head, member) \ argument
503 for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member); \
507 extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv,