Lines Matching refs:list
35 static inline void INIT_LIST_HEAD(struct list_head *list) in INIT_LIST_HEAD() argument
37 WRITE_ONCE(list->next, list); in INIT_LIST_HEAD()
38 WRITE_ONCE(list->prev, list); in INIT_LIST_HEAD()
296 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
298 __list_del_entry(list); in list_move()
299 list_add(list, head); in list_move()
307 static inline void list_move_tail(struct list_head *list, in list_move_tail() argument
310 __list_del_entry(list); in list_move_tail()
311 list_add_tail(list, head); in list_move_tail()
342 static inline int list_is_first(const struct list_head *list, const struct list_head *head) in list_is_first() argument
344 return list->prev == head; in list_is_first()
352 static inline int list_is_last(const struct list_head *list, const struct list_head *head) in list_is_last() argument
354 return list->next == head; in list_is_last()
362 static inline int list_is_head(const struct list_head *list, const struct list_head *head) in list_is_head() argument
364 return list == head; in list_is_head()
434 static inline void list_rotate_to_front(struct list_head *list, in list_rotate_to_front() argument
442 list_move_tail(head, list); in list_rotate_to_front()
454 static inline void __list_cut_position(struct list_head *list, in __list_cut_position() argument
458 list->next = head->next; in __list_cut_position()
459 list->next->prev = list; in __list_cut_position()
460 list->prev = entry; in __list_cut_position()
461 entry->next = list; in __list_cut_position()
480 static inline void list_cut_position(struct list_head *list, in list_cut_position() argument
488 INIT_LIST_HEAD(list); in list_cut_position()
490 __list_cut_position(list, head, entry); in list_cut_position()
507 static inline void list_cut_before(struct list_head *list, in list_cut_before() argument
512 INIT_LIST_HEAD(list); in list_cut_before()
515 list->next = head->next; in list_cut_before()
516 list->next->prev = list; in list_cut_before()
517 list->prev = entry->prev; in list_cut_before()
518 list->prev->next = list; in list_cut_before()
523 static inline void __list_splice(const struct list_head *list, in __list_splice() argument
527 struct list_head *first = list->next; in __list_splice()
528 struct list_head *last = list->prev; in __list_splice()
542 static inline void list_splice(const struct list_head *list, in list_splice() argument
545 if (!list_empty(list)) in list_splice()
546 __list_splice(list, head, head->next); in list_splice()
554 static inline void list_splice_tail(struct list_head *list, in list_splice_tail() argument
557 if (!list_empty(list)) in list_splice_tail()
558 __list_splice(list, head->prev, head); in list_splice_tail()
568 static inline void list_splice_init(struct list_head *list, in list_splice_init() argument
571 if (!list_empty(list)) { in list_splice_init()
572 __list_splice(list, head, head->next); in list_splice_init()
573 INIT_LIST_HEAD(list); in list_splice_init()
585 static inline void list_splice_tail_init(struct list_head *list, in list_splice_tail_init() argument
588 if (!list_empty(list)) { in list_splice_tail_init()
589 __list_splice(list, head->prev, head); in list_splice_tail_init()
590 INIT_LIST_HEAD(list); in list_splice_tail_init()