Lines Matching refs:prev
91 list->next = list->prev = list; in INIT_LIST_HEAD()
106 return ((next == head) && (next == head->prev)); in list_empty_careful()
110 __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()
120 __list_del(entry->prev, entry->next); in __list_del_entry()
127 __list_del(entry->prev, entry->next); in list_del()
134 new->next->prev = new; in list_replace()
135 new->prev = old->prev; in list_replace()
136 new->prev->next = new; in list_replace()
147 __list_add(struct list_head *new, struct list_head *prev, in __list_add() argument
151 next->prev = new; in __list_add()
153 new->prev = prev; in __list_add()
154 prev->next = new; in __list_add()
171 list_entry((ptr)->prev, type, member)
183 list_entry(((ptr)->member.prev), typeof(*(ptr)), member)
214 for (p = list_entry((h)->prev, typeof(*p), field); &(p)->field != (h); \
215 p = list_entry((p)->field.prev, typeof(*p), field))
218 for (p = list_entry((h)->prev, typeof(*p), field), \
219 n = list_entry((p)->field.prev, typeof(*p), field); &(p)->field != (h); \
220 p = n, n = list_entry(n->field.prev, typeof(*n), field))
223 for (p = list_entry((p)->field.prev, typeof(*p), field); &(p)->field != (h); \
224 p = list_entry((p)->field.prev, typeof(*p), field))
226 #define list_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = (p)->prev)
229 for (p = (h)->prev, n = (p)->prev; \
231 p = n, n = (p)->prev)
248 __list_add(new, head->prev, head); in list_add_tail()
278 first->prev->next = last->next; in list_bulk_move_tail()
279 last->next->prev = first->prev; in list_bulk_move_tail()
280 head->prev->next = first; in list_bulk_move_tail()
281 first->prev = head->prev; in list_bulk_move_tail()
283 head->prev = last; in list_bulk_move_tail()
287 linux_list_splice(const struct list_head *list, struct list_head *prev, in linux_list_splice() argument
296 last = list->prev; in linux_list_splice()
297 first->prev = prev; in linux_list_splice()
298 prev->next = first; in linux_list_splice()
300 next->prev = last; in linux_list_splice()
314 linux_list_splice(list, head->prev, head); in list_splice_tail()
329 linux_list_splice(list, head->prev, head); in list_splice_tail_init()
407 hlist_add_behind(struct hlist_node *n, struct hlist_node *prev) in hlist_add_behind() argument
410 n->next = prev->next; in hlist_add_behind()
411 WRITE_ONCE(prev->next, n); in hlist_add_behind()
412 n->pprev = &prev->next; in hlist_add_behind()
430 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
438 list->next->prev = list; in __list_cut_position()
439 list->prev = entry; in __list_cut_position()
442 new_first->prev = head; in __list_cut_position()
463 return (list->prev == head); in list_is_first()