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