Lines Matching refs:list
33 static inline void INIT_LIST_HEAD(struct list_head *list) in INIT_LIST_HEAD() argument
35 WRITE_ONCE(list->next, list); in INIT_LIST_HEAD()
36 WRITE_ONCE(list->prev, list); in INIT_LIST_HEAD()
213 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
215 __list_del_entry(list); in list_move()
216 list_add(list, head); in list_move()
224 static inline void list_move_tail(struct list_head *list, in list_move_tail() argument
227 __list_del_entry(list); in list_move_tail()
228 list_add_tail(list, head); in list_move_tail()
259 static inline int list_is_first(const struct list_head *list, const struct list_head *head) in list_is_first() argument
261 return list->prev == head; in list_is_first()
269 static inline int list_is_last(const struct list_head *list, const struct list_head *head) in list_is_last() argument
271 return list->next == head; in list_is_last()
279 static inline int list_is_head(const struct list_head *list, const struct list_head *head) in list_is_head() argument
281 return list == head; in list_is_head()
351 static inline void list_rotate_to_front(struct list_head *list, in list_rotate_to_front() argument
359 list_move_tail(head, list); in list_rotate_to_front()
371 static inline void __list_cut_position(struct list_head *list, in __list_cut_position() argument
375 list->next = head->next; in __list_cut_position()
376 list->next->prev = list; in __list_cut_position()
377 list->prev = entry; in __list_cut_position()
378 entry->next = list; in __list_cut_position()
397 static inline void list_cut_position(struct list_head *list, in list_cut_position() argument
405 INIT_LIST_HEAD(list); in list_cut_position()
407 __list_cut_position(list, head, entry); in list_cut_position()
424 static inline void list_cut_before(struct list_head *list, in list_cut_before() argument
429 INIT_LIST_HEAD(list); in list_cut_before()
432 list->next = head->next; in list_cut_before()
433 list->next->prev = list; in list_cut_before()
434 list->prev = entry->prev; in list_cut_before()
435 list->prev->next = list; in list_cut_before()
440 static inline void __list_splice(const struct list_head *list, in __list_splice() argument
444 struct list_head *first = list->next; in __list_splice()
445 struct list_head *last = list->prev; in __list_splice()
459 static inline void list_splice(const struct list_head *list, in list_splice() argument
462 if (!list_empty(list)) in list_splice()
463 __list_splice(list, head, head->next); in list_splice()
471 static inline void list_splice_tail(struct list_head *list, in list_splice_tail() argument
474 if (!list_empty(list)) in list_splice_tail()
475 __list_splice(list, head->prev, head); in list_splice_tail()
485 static inline void list_splice_init(struct list_head *list, in list_splice_init() argument
488 if (!list_empty(list)) { in list_splice_init()
489 __list_splice(list, head, head->next); in list_splice_init()
490 INIT_LIST_HEAD(list); in list_splice_init()
502 static inline void list_splice_tail_init(struct list_head *list, in list_splice_tail_init() argument
505 if (!list_empty(list)) { in list_splice_tail_init()
506 __list_splice(list, head->prev, head); in list_splice_tail_init()
507 INIT_LIST_HEAD(list); in list_splice_tail_init()