Lines Matching refs:list

38 #define wq_list_empty(list)	(READ_ONCE((list)->first) == NULL)  argument
39 #define INIT_WQ_LIST(list) do { \ argument
40 (list)->first = NULL; \
45 struct io_wq_work_list *list) in wq_list_add_after() argument
52 list->last = node; in wq_list_add_after()
56 struct io_wq_work_list *list) in wq_list_add_tail() argument
59 if (!list->first) { in wq_list_add_tail()
60 list->last = node; in wq_list_add_tail()
61 WRITE_ONCE(list->first, node); in wq_list_add_tail()
63 list->last->next = node; in wq_list_add_tail()
64 list->last = node; in wq_list_add_tail()
69 struct io_wq_work_list *list) in wq_list_add_head() argument
71 node->next = list->first; in wq_list_add_head()
73 list->last = node; in wq_list_add_head()
74 WRITE_ONCE(list->first, node); in wq_list_add_head()
77 static inline void wq_list_cut(struct io_wq_work_list *list, in wq_list_cut() argument
83 WRITE_ONCE(list->first, last->next); in wq_list_cut()
87 if (last == list->last) in wq_list_cut()
88 list->last = prev; in wq_list_cut()
92 static inline void __wq_list_splice(struct io_wq_work_list *list, in __wq_list_splice() argument
95 list->last->next = to->next; in __wq_list_splice()
96 to->next = list->first; in __wq_list_splice()
97 INIT_WQ_LIST(list); in __wq_list_splice()
100 static inline bool wq_list_splice(struct io_wq_work_list *list, in wq_list_splice() argument
103 if (!wq_list_empty(list)) { in wq_list_splice()
104 __wq_list_splice(list, to); in wq_list_splice()
117 static inline void wq_list_del(struct io_wq_work_list *list, in wq_list_del() argument
121 wq_list_cut(list, node, prev); in wq_list_del()
134 struct io_wq_work_node list; member
140 if (!work->list.next) in wq_next_work()
143 return container_of(work->list.next, struct io_wq_work, list); in wq_next_work()