Lines Matching refs:next

18  * sometimes we already know the next/prev entries and we can
37 WRITE_ONCE(list->next, list);
55 struct list_head *next);
67 struct list_head *next)
73 * With the hardening version, elide checking if next and prev
83 if (likely(next->prev == prev && prev->next == next && new != prev && new != next))
88 ret &= __list_add_valid_or_report(new, prev, next);
112 struct list_head *next = entry->next;
115 * With the hardening version, elide checking if next and prev
119 if (likely(prev->next == entry && next->prev == entry))
130 struct list_head *next)
144 * the prev/next entries already!
148 struct list_head *next)
150 if (!__list_add_valid(new, prev, next))
153 next->prev = new;
154 new->next = next;
156 WRITE_ONCE(prev->next, new);
169 __list_add(new, head, head->next);
187 * Delete a list entry by making the prev/next entries
191 * the prev/next entries already!
193 static inline void __list_del(struct list_head * prev, struct list_head * next)
195 next->prev = prev;
196 WRITE_ONCE(prev->next, next);
209 __list_del(entry->prev, entry->next);
218 __list_del(entry->prev, entry->next);
230 entry->next = LIST_POISON1;
244 new->next = old->next;
245 new->next->prev = new;
247 new->prev->next = new;
327 first->prev->next = last->next;
328 last->next->prev = first->prev;
330 head->prev->next = first;
333 last->next = head;
354 return list->next == head;
373 return READ_ONCE(head->next) == head;
391 smp_store_release(&entry->next, entry);
400 * in the process of modifying either member (next or prev)
409 struct list_head *next = smp_load_acquire(&head->next);
410 return list_is_head(next, head) && (next == READ_ONCE(head->prev));
422 first = head->next;
451 return !list_empty(head) && (head->next == head->prev);
457 struct list_head *new_first = entry->next;
458 list->next = head->next;
459 list->next->prev = list;
461 entry->next = list;
462 head->next = new_first;
485 if (list_is_singular(head) && !list_is_head(entry, head) && (entry != head->next))
511 if (head->next == entry) {
515 list->next = head->next;
516 list->next->prev = list;
518 list->prev->next = list;
519 head->next = entry;
525 struct list_head *next)
527 struct list_head *first = list->next;
531 prev->next = first;
533 last->next = next;
534 next->prev = last;
546 __list_splice(list, head, head->next);
572 __list_splice(list, head, head->next);
612 list_entry((ptr)->next, type, member)
635 struct list_head *pos__ = READ_ONCE(head__->next); \
640 * list_next_entry - get the next element in list
645 list_entry((pos)->member.next, typeof(*(pos)), member)
648 * list_next_entry_circular - get the next element in list
687 for (pos = (head)->next; !list_is_head(pos, (head)); pos = pos->next)
703 for (pos = rcu_dereference((head)->next); \
705 pos = rcu_dereference(pos->next))
715 for (pos = pos->next; !list_is_head(pos, (head)); pos = pos->next)
732 for (pos = (head)->next, n = pos->next; \
734 pos = n, n = pos->next)
944 h->next = NULL;
985 struct hlist_node *next = n->next;
988 WRITE_ONCE(*pprev, next);
989 if (next)
990 WRITE_ONCE(next->pprev, pprev);
1003 n->next = LIST_POISON1;
1032 WRITE_ONCE(n->next, first);
1034 WRITE_ONCE(first->pprev, &n->next);
1042 * @next: hlist node to add it before, which must be non-NULL
1045 struct hlist_node *next)
1047 WRITE_ONCE(n->pprev, next->pprev);
1048 WRITE_ONCE(n->next, next);
1049 WRITE_ONCE(next->pprev, &n->next);
1061 WRITE_ONCE(n->next, prev->next);
1062 WRITE_ONCE(prev->next, n);
1063 WRITE_ONCE(n->pprev, &prev->next);
1065 if (n->next)
1066 WRITE_ONCE(n->next->pprev, &n->next);
1079 n->pprev = &n->next;
1088 return h->pprev == &h->next;
1102 return !n->next && n->pprev == &h->first;
1135 to->first->pprev = &last->next;
1136 last->next = to->first;
1145 for (pos = (head)->first; pos ; pos = pos->next)
1148 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
1165 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1173 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
1175 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1184 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1195 pos && ({ n = pos->member.next; 1; }); \