Lines Matching refs:head
84 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
86 __list_add(new, head, head->next); in list_add()
97 static inline void list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
99 __list_add(new, head->prev, head); in list_add_tail()
169 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
172 list_add(list, head); in list_move()
181 struct list_head *head) in list_move_tail() argument
184 list_add_tail(list, head); in list_move_tail()
193 const struct list_head *head) in list_is_last() argument
195 return list->next == head; in list_is_last()
202 static inline int list_empty(const struct list_head *head) in list_empty() argument
204 return head->next == head; in list_empty()
220 static inline int list_empty_careful(const struct list_head *head) in list_empty_careful() argument
222 struct list_head *next = head->next; in list_empty_careful()
223 return (next == head) && (next == head->prev); in list_empty_careful()
230 static inline int list_is_singular(const struct list_head *head) in list_is_singular() argument
232 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
236 struct list_head *head, in __list_cut_position() argument
240 list->next = head->next; in __list_cut_position()
244 head->next = new_first; in __list_cut_position()
245 new_first->prev = head; in __list_cut_position()
263 struct list_head *head, in list_cut_position() argument
266 if (list_empty(head)) in list_cut_position()
268 if (list_is_singular(head) && (head->next != entry && head != entry)) in list_cut_position()
270 if (entry == head) in list_cut_position()
273 __list_cut_position(list, head, entry); in list_cut_position()
295 struct list_head *head) in list_splice() argument
298 __list_splice(list, head, head->next); in list_splice()
307 struct list_head *head) in list_splice_tail() argument
310 __list_splice(list, head->prev, head); in list_splice_tail()
321 struct list_head *head) in list_splice_init() argument
324 __list_splice(list, head, head->next); in list_splice_init()
338 struct list_head *head) in list_splice_tail_init() argument
341 __list_splice(list, head->prev, head); in list_splice_tail_init()
371 #define list_for_each(pos, head) \ argument
372 for (pos = (head)->next; prefetch(pos->next), pos != (head); \
380 #define list_for_each_prev(pos, head) \ argument
381 for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \
390 #define list_for_each_safe(pos, n, head) \ argument
391 for (pos = (head)->next, n = pos->next; pos != (head); \
400 #define list_for_each_prev_safe(pos, n, head) \ argument
401 for (pos = (head)->prev, n = pos->prev; \
402 prefetch(pos->prev), pos != (head); \
411 #define list_for_each_entry(pos, head, member) \ argument
412 for (pos = list_entry((head)->next, typeof(*pos), member); \
413 &pos->member != (head); \
422 #define list_for_each_entry_reverse(pos, head, member) \ argument
423 for (pos = list_entry((head)->prev, typeof(*pos), member); \
424 prefetch(pos->member.prev), &pos->member != (head); \
435 #define list_prepare_entry(pos, head, member) \ argument
436 ((pos) ? : list_entry(head, typeof(*pos), member))
447 #define list_for_each_entry_continue(pos, head, member) \ argument
449 prefetch(pos->member.next), &pos->member != (head); \
461 #define list_for_each_entry_continue_reverse(pos, head, member) \ argument
463 prefetch(pos->member.prev), &pos->member != (head); \
474 #define list_for_each_entry_from(pos, head, member) \ argument
475 for (; prefetch(pos->member.next), &pos->member != (head); \
485 #define list_for_each_entry_safe(pos, n, head, member) \ argument
486 for (pos = list_entry((head)->next, typeof(*pos), member), \
488 &pos->member != (head); \
501 #define list_for_each_entry_safe_continue(pos, n, head, member) \ argument
504 &pos->member != (head); \
517 #define list_for_each_entry_safe_from(pos, n, head, member) \ argument
519 &pos->member != (head); \
532 #define list_for_each_entry_safe_reverse(pos, n, head, member) \ argument
533 for (pos = list_entry((head)->prev, typeof(*pos), member), \
535 &pos->member != (head); \