Lines Matching refs:list
26 static inline void INIT_LIST_HEAD(struct list_head *list) in INIT_LIST_HEAD() argument
28 WRITE_ONCE(list->next, list); in INIT_LIST_HEAD()
29 list->prev = list; in INIT_LIST_HEAD()
199 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
201 __list_del_entry(list); in list_move()
202 list_add(list, head); in list_move()
210 static inline void list_move_tail(struct list_head *list, in list_move_tail() argument
213 __list_del_entry(list); in list_move_tail()
214 list_add_tail(list, head); in list_move_tail()
245 static inline int list_is_first(const struct list_head *list, in list_is_first() argument
248 return list->prev == head; in list_is_first()
256 static inline int list_is_last(const struct list_head *list, in list_is_last() argument
259 return list->next == head; in list_is_last()
329 static inline void list_rotate_to_front(struct list_head *list, in list_rotate_to_front() argument
337 list_move_tail(head, list); in list_rotate_to_front()
349 static inline void __list_cut_position(struct list_head *list, in __list_cut_position() argument
353 list->next = head->next; in __list_cut_position()
354 list->next->prev = list; in __list_cut_position()
355 list->prev = entry; in __list_cut_position()
356 entry->next = list; in __list_cut_position()
375 static inline void list_cut_position(struct list_head *list, in list_cut_position() argument
384 INIT_LIST_HEAD(list); in list_cut_position()
386 __list_cut_position(list, head, entry); in list_cut_position()
403 static inline void list_cut_before(struct list_head *list, in list_cut_before() argument
408 INIT_LIST_HEAD(list); in list_cut_before()
411 list->next = head->next; in list_cut_before()
412 list->next->prev = list; in list_cut_before()
413 list->prev = entry->prev; in list_cut_before()
414 list->prev->next = list; in list_cut_before()
419 static inline void __list_splice(const struct list_head *list, in __list_splice() argument
423 struct list_head *first = list->next; in __list_splice()
424 struct list_head *last = list->prev; in __list_splice()
438 static inline void list_splice(const struct list_head *list, in list_splice() argument
441 if (!list_empty(list)) in list_splice()
442 __list_splice(list, head, head->next); in list_splice()
450 static inline void list_splice_tail(struct list_head *list, in list_splice_tail() argument
453 if (!list_empty(list)) in list_splice_tail()
454 __list_splice(list, head->prev, head); in list_splice_tail()
464 static inline void list_splice_init(struct list_head *list, in list_splice_init() argument
467 if (!list_empty(list)) { in list_splice_init()
468 __list_splice(list, head, head->next); in list_splice_init()
469 INIT_LIST_HEAD(list); in list_splice_init()
481 static inline void list_splice_tail_init(struct list_head *list, in list_splice_tail_init() argument
484 if (!list_empty(list)) { in list_splice_tail_init()
485 __list_splice(list, head->prev, head); in list_splice_tail_init()
486 INIT_LIST_HEAD(list); in list_splice_tail_init()