Lines Matching refs:next

37 	WRITE_ONCE(list->next, list);  in INIT_LIST_HEAD()
44 struct list_head *next);
49 struct list_head *next) in __list_add_valid() argument
67 struct list_head *next) in __list_add() argument
69 if (!__list_add_valid(new, prev, next)) in __list_add()
72 next->prev = new; in __list_add()
73 new->next = next; in __list_add()
75 WRITE_ONCE(prev->next, new); in __list_add()
88 __list_add(new, head, head->next); in list_add()
112 static inline void __list_del(struct list_head * prev, struct list_head * next) in __list_del() argument
114 next->prev = prev; in __list_del()
115 WRITE_ONCE(prev->next, next); in __list_del()
128 __list_del(entry->prev, entry->next); in __list_del_clearprev()
137 __list_del(entry->prev, entry->next); in __list_del_entry()
149 entry->next = LIST_POISON1; in list_del()
163 new->next = old->next; in list_replace()
164 new->next->prev = new; in list_replace()
166 new->prev->next = new; in list_replace()
246 first->prev->next = last->next; in list_bulk_move_tail()
247 last->next->prev = first->prev; in list_bulk_move_tail()
249 head->prev->next = first; in list_bulk_move_tail()
252 last->next = head; in list_bulk_move_tail()
273 return list->next == head; in list_is_last()
292 return READ_ONCE(head->next) == head; in list_empty()
310 smp_store_release(&entry->next, entry); in list_del_init_careful()
328 struct list_head *next = smp_load_acquire(&head->next); in list_empty_careful() local
329 return list_is_head(next, head) && (next == READ_ONCE(head->prev)); in list_empty_careful()
341 first = head->next; in list_rotate_left()
370 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
376 struct list_head *new_first = entry->next; in __list_cut_position()
377 list->next = head->next; in __list_cut_position()
378 list->next->prev = list; in __list_cut_position()
380 entry->next = list; in __list_cut_position()
381 head->next = new_first; in __list_cut_position()
404 if (list_is_singular(head) && !list_is_head(entry, head) && (entry != head->next)) in list_cut_position()
430 if (head->next == entry) { in list_cut_before()
434 list->next = head->next; in list_cut_before()
435 list->next->prev = list; in list_cut_before()
437 list->prev->next = list; in list_cut_before()
438 head->next = entry; in list_cut_before()
444 struct list_head *next) in __list_splice() argument
446 struct list_head *first = list->next; in __list_splice()
450 prev->next = first; in __list_splice()
452 last->next = next; in __list_splice()
453 next->prev = last; in __list_splice()
465 __list_splice(list, head, head->next); in list_splice()
491 __list_splice(list, head, head->next); in list_splice_init()
531 list_entry((ptr)->next, type, member)
554 struct list_head *pos__ = READ_ONCE(head__->next); \
564 list_entry((pos)->member.next, typeof(*(pos)), member)
606 for (pos = (head)->next; !list_is_head(pos, (head)); pos = pos->next)
614 for (pos = rcu_dereference((head)->next); \
616 pos = rcu_dereference(pos->next))
626 for (pos = pos->next; !list_is_head(pos, (head)); pos = pos->next)
643 for (pos = (head)->next, n = pos->next; \
645 pos = n, n = pos->next)
840 h->next = NULL; in INIT_HLIST_NODE()
881 struct hlist_node *next = n->next; in __hlist_del() local
884 WRITE_ONCE(*pprev, next); in __hlist_del()
885 if (next) in __hlist_del()
886 WRITE_ONCE(next->pprev, pprev); in __hlist_del()
899 n->next = LIST_POISON1; in hlist_del()
928 WRITE_ONCE(n->next, first); in hlist_add_head()
930 WRITE_ONCE(first->pprev, &n->next); in hlist_add_head()
941 struct hlist_node *next) in hlist_add_before() argument
943 WRITE_ONCE(n->pprev, next->pprev); in hlist_add_before()
944 WRITE_ONCE(n->next, next); in hlist_add_before()
945 WRITE_ONCE(next->pprev, &n->next); in hlist_add_before()
957 WRITE_ONCE(n->next, prev->next); in hlist_add_behind()
958 WRITE_ONCE(prev->next, n); in hlist_add_behind()
959 WRITE_ONCE(n->pprev, &prev->next); in hlist_add_behind()
961 if (n->next) in hlist_add_behind()
962 WRITE_ONCE(n->next->pprev, &n->next); in hlist_add_behind()
975 n->pprev = &n->next; in hlist_add_fake()
984 return h->pprev == &h->next; in hlist_fake()
998 return !n->next && n->pprev == &h->first; in hlist_is_singular_node()
1021 for (pos = (head)->first; pos ; pos = pos->next)
1024 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
1041 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1049 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
1051 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1060 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1071 pos && ({ n = pos->member.next; 1; }); \