Lines Matching refs:next
92 struct list_head *next; member
101 list->next = list->prev = list; in INIT_LIST_HEAD()
108 return (head->next == head); in list_empty()
114 struct list_head *next = head->next; in list_empty_careful() local
116 return ((next == head) && (next == head->prev)); in list_empty_careful()
120 __list_del(struct list_head *prev, struct list_head *next) in __list_del() argument
122 next->prev = prev; in __list_del()
123 WRITE_ONCE(prev->next, next); in __list_del()
130 __list_del(entry->prev, entry->next); in __list_del_entry()
137 __list_del(entry->prev, entry->next); in list_del()
143 new->next = old->next; in list_replace()
144 new->next->prev = new; in list_replace()
146 new->prev->next = new; in list_replace()
158 struct list_head *next) in linux_list_add() argument
161 next->prev = new; in linux_list_add()
162 new->next = next; in linux_list_add()
164 prev->next = new; in linux_list_add()
178 list_entry((ptr)->next, type, member)
187 list_entry(((ptr)->member.next), typeof(*(ptr)), member)
196 for (p = (head)->next; p != (head); p = (p)->next)
199 for (p = (head)->next, n = (p)->next; p != (head); p = n, n = (p)->next)
202 for (p = list_entry((h)->next, typeof(*p), field); &(p)->field != (h); \
203 p = list_entry((p)->field.next, typeof(*p), field))
206 for (p = list_entry((h)->next, typeof(*p), field), \
207 n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\
208 p = n, n = list_entry(n->field.next, typeof(*n), field))
212 p = list_entry((p)->field.next, typeof(*p), field))
219 for (n = list_entry((pos)->member.next, typeof(*pos), member); \
221 pos = n, n = list_entry(n->member.next, typeof(*n), member))
246 linux_list_add(new, head, head->next); in list_add()
283 first->prev->next = last->next; in list_bulk_move_tail()
284 last->next->prev = first->prev; in list_bulk_move_tail()
285 head->prev->next = first; in list_bulk_move_tail()
287 last->next = head; in list_bulk_move_tail()
293 struct list_head *next) in linux_list_splice() argument
300 first = list->next; in linux_list_splice()
303 prev->next = first; in linux_list_splice()
304 last->next = next; in linux_list_splice()
305 next->prev = last; in linux_list_splice()
312 linux_list_splice(list, head, head->next); in list_splice()
326 linux_list_splice(list, head, head->next); in list_splice_init()
346 struct hlist_node *next, **pprev; member
353 (node)->next = NULL; \
375 WRITE_ONCE(*(n->pprev), n->next); in hlist_del()
376 if (n->next != NULL) in hlist_del()
377 n->next->pprev = n->pprev; in hlist_del()
394 n->next = h->first; in hlist_add_head()
396 h->first->pprev = &n->next; in hlist_add_head()
402 hlist_add_before(struct hlist_node *n, struct hlist_node *next) in hlist_add_before() argument
405 n->pprev = next->pprev; in hlist_add_before()
406 n->next = next; in hlist_add_before()
407 next->pprev = &n->next; in hlist_add_before()
415 n->next = prev->next; in hlist_add_behind()
416 WRITE_ONCE(prev->next, n); in hlist_add_behind()
417 n->pprev = &prev->next; in hlist_add_behind()
419 if (n->next != NULL) in hlist_add_behind()
420 n->next->pprev = &n->next; in hlist_add_behind()
435 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
441 struct list_head *new_first = entry->next; in __list_cut_position()
442 list->next = head->next; in __list_cut_position()
443 list->next->prev = list; in __list_cut_position()
445 entry->next = list; in __list_cut_position()
446 head->next = new_first; in __list_cut_position()
456 (head->next != entry && head != entry)) in list_cut_position()
474 return list->next == head; in list_is_last()
480 for (p = (head)->first; p; p = (p)->next)
483 for (p = (head)->first; p && ({ n = (p)->next; 1; }); p = n)
491 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
494 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member); \
496 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
500 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
504 (pos) && ({ n = (pos)->member.next; 1; }); \