Lines Matching refs:head

98 list_empty(const struct list_head *head)
101 return (head->next == head);
105 list_empty_careful(const struct list_head *head)
107 struct list_head *next = head->next;
109 return ((next == head) && (next == head->prev));
188 #define list_for_each(p, head) \
189 for (p = (head)->next; p != (head); p = (p)->next)
191 #define list_for_each_safe(p, n, head) \
192 for (p = (head)->next, n = (p)->next; p != (head); p = n, n = (p)->next)
211 #define list_for_each_entry_safe_from(pos, n, head, member) \
213 &(pos)->member != (head); \
236 list_add(struct list_head *new, struct list_head *head)
239 linux_list_add(new, head, head->next);
243 list_add_tail(struct list_head *new, struct list_head *head)
246 linux_list_add(new, head->prev, head);
250 list_move(struct list_head *list, struct list_head *head)
254 list_add(list, head);
258 list_move_tail(struct list_head *entry, struct list_head *head)
262 list_add_tail(entry, head);
266 list_bulk_move_tail(struct list_head *head, struct list_head *first,
271 head->prev->next = first;
272 first->prev = head->prev;
273 last->next = head;
274 head->prev = last;
295 list_splice(const struct list_head *list, struct list_head *head)
298 linux_list_splice(list, head, head->next);
302 list_splice_tail(struct list_head *list, struct list_head *head)
305 linux_list_splice(list, head->prev, head);
309 list_splice_init(struct list_head *list, struct list_head *head)
312 linux_list_splice(list, head, head->next);
317 list_splice_tail_init(struct list_head *list, struct list_head *head)
320 linux_list_splice(list, head->prev, head);
338 #define INIT_HLIST_HEAD(head) (head)->first = NULL
421 static inline int list_is_singular(const struct list_head *head)
423 return !list_empty(head) && (head->next == head->prev);
427 struct list_head *head, struct list_head *entry)
430 list->next = head->next;
434 head->next = new_first;
435 new_first->prev = head;
439 struct list_head *head, struct list_head *entry)
441 if (list_empty(head))
443 if (list_is_singular(head) &&
444 (head->next != entry && head != entry))
446 if (entry == head)
449 __list_cut_position(list, head, entry);
453 const struct list_head *head)
455 return list->next == head;
460 #define hlist_for_each(p, head) \
461 for (p = (head)->first; p; p = (p)->next)
463 #define hlist_for_each_safe(p, n, head) \
464 for (p = (head)->first; p && ({ n = (p)->next; 1; }); p = n)
469 #define hlist_for_each_entry(pos, head, member) \
470 for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
483 #define hlist_for_each_entry_safe(pos, n, head, member) \
484 for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member); \
488 extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv,