• Home
  • Raw
  • Download

Lines Matching refs:head

60 static inline void list_add(struct list_head *new, struct list_head *head)  in list_add()  argument
62 __list_add(new, head, head->next); in list_add()
74 static inline void list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
76 __list_add(new, head->prev, head); in list_add_tail()
153 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
156 list_add(list, head); in list_move()
165 struct list_head *head) in list_move_tail() argument
168 list_add_tail(list, head); in list_move_tail()
177 const struct list_head *head) in list_is_last() argument
179 return list->next == head; in list_is_last()
186 static inline int list_empty(const struct list_head *head) in list_empty() argument
188 return head->next == head; in list_empty()
204 static inline int list_empty_careful(const struct list_head *head) in list_empty_careful() argument
206 struct list_head *next = head->next; in list_empty_careful()
207 return (next == head) && (next == head->prev); in list_empty_careful()
214 static inline void list_rotate_left(struct list_head *head) in list_rotate_left() argument
218 if (!list_empty(head)) { in list_rotate_left()
219 first = head->next; in list_rotate_left()
220 list_move_tail(first, head); in list_rotate_left()
228 static inline int list_is_singular(const struct list_head *head) in list_is_singular() argument
230 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
234 struct list_head *head, struct list_head *entry) in __list_cut_position() argument
237 list->next = head->next; in __list_cut_position()
241 head->next = new_first; in __list_cut_position()
242 new_first->prev = head; in __list_cut_position()
260 struct list_head *head, struct list_head *entry) in list_cut_position() argument
262 if (list_empty(head)) in list_cut_position()
264 if (list_is_singular(head) && in list_cut_position()
265 (head->next != entry && head != entry)) in list_cut_position()
267 if (entry == head) in list_cut_position()
270 __list_cut_position(list, head, entry); in list_cut_position()
293 struct list_head *head) in list_splice() argument
296 __list_splice(list, head, head->next); in list_splice()
305 struct list_head *head) in list_splice_tail() argument
308 __list_splice(list, head->prev, head); in list_splice_tail()
319 struct list_head *head) in list_splice_init() argument
322 __list_splice(list, head, head->next); in list_splice_init()
336 struct list_head *head) in list_splice_tail_init() argument
339 __list_splice(list, head->prev, head); in list_splice_tail_init()
369 #define list_for_each(pos, head) \ argument
370 for (pos = (head)->next; pos != (head); pos = pos->next)
380 #define __list_for_each(pos, head) \ argument
381 for (pos = (head)->next; pos != (head); pos = pos->next)
388 #define list_for_each_prev(pos, head) \ argument
389 for (pos = (head)->prev; pos != (head); pos = pos->prev)
397 #define list_for_each_safe(pos, n, head) \ argument
398 for (pos = (head)->next, n = pos->next; pos != (head); \
407 #define list_for_each_prev_safe(pos, n, head) \ argument
408 for (pos = (head)->prev, n = pos->prev; \
409 pos != (head); \
418 #define list_for_each_entry(pos, head, member) \ argument
419 for (pos = list_entry((head)->next, typeof(*pos), member); \
420 &pos->member != (head); \
429 #define list_for_each_entry_reverse(pos, head, member) \ argument
430 for (pos = list_entry((head)->prev, typeof(*pos), member); \
431 &pos->member != (head); \
442 #define list_prepare_entry(pos, head, member) \ argument
443 ((pos) ? : list_entry(head, typeof(*pos), member))
454 #define list_for_each_entry_continue(pos, head, member) \ argument
456 &pos->member != (head); \
468 #define list_for_each_entry_continue_reverse(pos, head, member) \ argument
470 &pos->member != (head); \
481 #define list_for_each_entry_from(pos, head, member) \ argument
482 for (; &pos->member != (head); \
492 #define list_for_each_entry_safe(pos, n, head, member) \ argument
493 for (pos = list_entry((head)->next, typeof(*pos), member), \
495 &pos->member != (head); \
508 #define list_for_each_entry_safe_continue(pos, n, head, member) \ argument
511 &pos->member != (head); \
524 #define list_for_each_entry_safe_from(pos, n, head, member) \ argument
526 &pos->member != (head); \
539 #define list_for_each_entry_safe_reverse(pos, n, head, member) \ argument
540 for (pos = list_entry((head)->prev, typeof(*pos), member), \
542 &pos->member != (head); \
662 #define hlist_for_each(pos, head) \ argument
663 for (pos = (head)->first; pos ; pos = pos->next)
665 #define hlist_for_each_safe(pos, n, head) \ argument
666 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
676 #define hlist_for_each_entry(tpos, pos, head, member) \ argument
677 for (pos = (head)->first; \
713 #define hlist_for_each_entry_safe(tpos, pos, n, head, member) \ argument
714 for (pos = (head)->first; \