Lines Matching refs:head
90 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
92 __list_add(new, head, head->next); in list_add()
103 static inline void list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
105 __list_add(new, head->prev, head); in list_add_tail()
140 static inline void list_add_rcu(struct list_head *new, struct list_head *head) in list_add_rcu() argument
142 __list_add_rcu(new, head, head->next); in list_add_rcu()
162 struct list_head *head) in list_add_tail_rcu() argument
164 __list_add_rcu(new, head->prev, head); in list_add_tail_rcu()
238 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
241 list_add(list, head); in list_move()
250 struct list_head *head) in list_move_tail() argument
253 list_add_tail(list, head); in list_move_tail()
260 static inline int list_empty(const struct list_head *head) in list_empty() argument
262 return head->next == head; in list_empty()
277 static inline int list_empty_careful(const struct list_head *head) in list_empty_careful() argument
279 struct list_head *next = head->next; in list_empty_careful()
280 return (next == head) && (next == head->prev); in list_empty_careful()
284 struct list_head *head) in __list_splice() argument
288 struct list_head *at = head->next; in __list_splice()
290 first->prev = head; in __list_splice()
291 head->next = first; in __list_splice()
302 static inline void list_splice(struct list_head *list, struct list_head *head) in list_splice() argument
305 __list_splice(list, head); in list_splice()
316 struct list_head *head) in list_splice_init() argument
319 __list_splice(list, head); in list_splice_init()
338 #define list_for_each(pos, head) \ argument
339 for (pos = (head)->next, prefetch(pos->next); pos != (head); \
352 #define __list_for_each(pos, head) \ argument
353 for (pos = (head)->next; pos != (head); pos = pos->next)
360 #define list_for_each_prev(pos, head) \ argument
361 for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
370 #define list_for_each_safe(pos, n, head) \ argument
371 for (pos = (head)->next, n = pos->next; pos != (head); \
380 #define list_for_each_entry(pos, head, member) \ argument
381 for (pos = list_entry((head)->next, typeof(*pos), member), \
383 &pos->member != (head); \
393 #define list_for_each_entry_reverse(pos, head, member) \ argument
394 for (pos = list_entry((head)->prev, typeof(*pos), member), \
396 &pos->member != (head); \
407 #define list_prepare_entry(pos, head, member) \ argument
408 ((pos) ? : list_entry(head, typeof(*pos), member))
417 #define list_for_each_entry_continue(pos, head, member) \ argument
420 &pos->member != (head); \
431 #define list_for_each_entry_safe(pos, n, head, member) \ argument
432 for (pos = list_entry((head)->next, typeof(*pos), member), \
434 &pos->member != (head); \
446 #define list_for_each_rcu(pos, head) \ argument
447 for (pos = (head)->next, prefetch(pos->next); pos != (head); \
450 #define __list_for_each_rcu(pos, head) \ argument
451 for (pos = (head)->next; pos != (head); \
465 #define list_for_each_safe_rcu(pos, n, head) \ argument
466 for (pos = (head)->next, n = pos->next; pos != (head); \
479 #define list_for_each_entry_rcu(pos, head, member) \ argument
480 for (pos = list_entry((head)->next, typeof(*pos), member), \
482 &pos->member != (head); \
498 #define list_for_each_continue_rcu(pos, head) \ argument
499 for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \
648 #define hlist_for_each(pos, head) \ argument
649 for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
652 #define hlist_for_each_safe(pos, n, head) \ argument
653 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
663 #define hlist_for_each_entry(tpos, pos, head, member) \ argument
664 for (pos = (head)->first; \
700 #define hlist_for_each_entry_safe(tpos, pos, n, head, member) \ argument
701 for (pos = (head)->first; \
717 #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ argument
718 for (pos = (head)->first; \