Lines Matching full:list

12 #define wq_list_empty(list)	(READ_ONCE((list)->first) == NULL)  argument
14 #define INIT_WQ_LIST(list) do { \ argument
15 (list)->first = NULL; \
20 struct io_wq_work_list *list) in wq_list_add_after() argument
27 list->last = node; in wq_list_add_after()
31 * wq_list_merge - merge the second list to the first one.
32 * @list0: the first list
33 * @list1: the second list
53 struct io_wq_work_list *list) in wq_list_add_tail() argument
56 if (!list->first) { in wq_list_add_tail()
57 list->last = node; in wq_list_add_tail()
58 WRITE_ONCE(list->first, node); in wq_list_add_tail()
60 list->last->next = node; in wq_list_add_tail()
61 list->last = node; in wq_list_add_tail()
66 struct io_wq_work_list *list) in wq_list_add_head() argument
68 node->next = list->first; in wq_list_add_head()
70 list->last = node; in wq_list_add_head()
71 WRITE_ONCE(list->first, node); in wq_list_add_head()
74 static inline void wq_list_cut(struct io_wq_work_list *list, in wq_list_cut() argument
78 /* first in the list, if prev==NULL */ in wq_list_cut()
80 WRITE_ONCE(list->first, last->next); in wq_list_cut()
84 if (last == list->last) in wq_list_cut()
85 list->last = prev; in wq_list_cut()
89 static inline void __wq_list_splice(struct io_wq_work_list *list, in __wq_list_splice() argument
92 list->last->next = to->next; in __wq_list_splice()
93 to->next = list->first; in __wq_list_splice()
94 INIT_WQ_LIST(list); in __wq_list_splice()
97 static inline bool wq_list_splice(struct io_wq_work_list *list, in wq_list_splice() argument
100 if (!wq_list_empty(list)) { in wq_list_splice()
101 __wq_list_splice(list, to); in wq_list_splice()
114 static inline void wq_list_del(struct io_wq_work_list *list, in wq_list_del() argument
118 wq_list_cut(list, node, prev); in wq_list_del()
132 if (!work->list.next) in wq_next_work()
135 return container_of(work->list.next, struct io_wq_work, list); in wq_next_work()