Lines Matching full:next
16 * sometimes we already know the next/prev entries and we can
35 WRITE_ONCE(list->next, list); in INIT_LIST_HEAD()
42 struct list_head *next);
47 struct list_head *next) in __list_add_valid() argument
61 * the prev/next entries already!
65 struct list_head *next) in __list_add() argument
67 if (!__list_add_valid(new, prev, next)) in __list_add()
70 next->prev = new; in __list_add()
71 new->next = next; in __list_add()
73 WRITE_ONCE(prev->next, new); in __list_add()
86 __list_add(new, head, head->next); in list_add()
104 * Delete a list entry by making the prev/next entries
108 * the prev/next entries already!
110 static inline void __list_del(struct list_head * prev, struct list_head * next) in __list_del() argument
112 next->prev = prev; in __list_del()
113 WRITE_ONCE(prev->next, next); in __list_del()
126 __list_del(entry->prev, entry->next); in __list_del_clearprev()
135 __list_del(entry->prev, entry->next); in __list_del_entry()
147 entry->next = LIST_POISON1; in list_del()
161 new->next = old->next; in list_replace()
162 new->next->prev = new; in list_replace()
164 new->prev->next = new; in list_replace()
244 first->prev->next = last->next; in list_bulk_move_tail()
245 last->next->prev = first->prev; in list_bulk_move_tail()
247 head->prev->next = first; in list_bulk_move_tail()
250 last->next = head; in list_bulk_move_tail()
273 return list->next == head; in list_is_last()
282 return READ_ONCE(head->next) == head; in list_empty()
300 smp_store_release(&entry->next, entry); in list_del_init_careful()
309 * in the process of modifying either member (next or prev)
318 struct list_head *next = smp_load_acquire(&head->next); in list_empty_careful() local
319 return (next == head) && (next == head->prev); in list_empty_careful()
331 first = head->next; in list_rotate_left()
360 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
366 struct list_head *new_first = entry->next; in __list_cut_position()
367 list->next = head->next; in __list_cut_position()
368 list->next->prev = list; in __list_cut_position()
370 entry->next = list; in __list_cut_position()
371 head->next = new_first; in __list_cut_position()
395 (head->next != entry && head != entry)) in list_cut_position()
421 if (head->next == entry) { in list_cut_before()
425 list->next = head->next; in list_cut_before()
426 list->next->prev = list; in list_cut_before()
428 list->prev->next = list; in list_cut_before()
429 head->next = entry; in list_cut_before()
435 struct list_head *next) in __list_splice() argument
437 struct list_head *first = list->next; in __list_splice()
441 prev->next = first; in __list_splice()
443 last->next = next; in __list_splice()
444 next->prev = last; in __list_splice()
456 __list_splice(list, head, head->next); in list_splice()
482 __list_splice(list, head, head->next); in list_splice_init()
522 list_entry((ptr)->next, type, member)
545 struct list_head *pos__ = READ_ONCE(head__->next); \
550 * list_next_entry - get the next element in list
555 list_entry((pos)->member.next, typeof(*(pos)), member)
571 for (pos = (head)->next; pos != (head); pos = pos->next)
581 for (pos = pos->next; pos != (head); pos = pos->next)
598 for (pos = (head)->next, n = pos->next; pos != (head); \
599 pos = n, n = pos->next)
794 h->next = NULL; in INIT_HLIST_NODE()
835 struct hlist_node *next = n->next; in __hlist_del() local
838 WRITE_ONCE(*pprev, next); in __hlist_del()
839 if (next) in __hlist_del()
840 WRITE_ONCE(next->pprev, pprev); in __hlist_del()
853 n->next = LIST_POISON1; in hlist_del()
882 WRITE_ONCE(n->next, first); in hlist_add_head()
884 WRITE_ONCE(first->pprev, &n->next); in hlist_add_head()
892 * @next: hlist node to add it before, which must be non-NULL
895 struct hlist_node *next) in hlist_add_before() argument
897 WRITE_ONCE(n->pprev, next->pprev); in hlist_add_before()
898 WRITE_ONCE(n->next, next); in hlist_add_before()
899 WRITE_ONCE(next->pprev, &n->next); in hlist_add_before()
911 WRITE_ONCE(n->next, prev->next); in hlist_add_behind()
912 WRITE_ONCE(prev->next, n); in hlist_add_behind()
913 WRITE_ONCE(n->pprev, &prev->next); in hlist_add_behind()
915 if (n->next) in hlist_add_behind()
916 WRITE_ONCE(n->next->pprev, &n->next); in hlist_add_behind()
929 n->pprev = &n->next; in hlist_add_fake()
938 return h->pprev == &h->next; in hlist_fake()
952 return !n->next && n->pprev == &h->first; in hlist_is_singular_node()
975 for (pos = (head)->first; pos ; pos = pos->next)
978 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
995 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1003 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
1005 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1014 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1025 pos && ({ n = pos->member.next; 1; }); \