Lines Matching refs:list
15 #define wq_list_empty(list) (READ_ONCE((list)->first) == NULL)
17 #define INIT_WQ_LIST(list) do { \
18 (list)->first = NULL; \
23 struct io_wq_work_list *list)
30 list->last = node;
34 struct io_wq_work_list *list)
37 if (!list->first) {
38 list->last = node;
39 WRITE_ONCE(list->first, node);
41 list->last->next = node;
42 list->last = node;
47 struct io_wq_work_list *list)
49 node->next = list->first;
51 list->last = node;
52 WRITE_ONCE(list->first, node);
55 static inline void wq_list_cut(struct io_wq_work_list *list,
59 /* first in the list, if prev==NULL */
61 WRITE_ONCE(list->first, last->next);
65 if (last == list->last)
66 list->last = prev;
70 static inline void __wq_list_splice(struct io_wq_work_list *list,
73 list->last->next = to->next;
74 to->next = list->first;
75 INIT_WQ_LIST(list);
78 static inline bool wq_list_splice(struct io_wq_work_list *list,
81 if (!wq_list_empty(list)) {
82 __wq_list_splice(list, to);
95 static inline void wq_list_del(struct io_wq_work_list *list,
99 wq_list_cut(list, node, prev);
113 if (!work->list.next)
116 return container_of(work->list.next, struct io_wq_work, list);