Lines Matching refs:work
54 int task_work_add(struct task_struct *task, struct callback_head *work, in task_work_add() argument
65 kasan_record_aux_stack(work); in task_work_add()
72 work->next = head; in task_work_add()
73 } while (!try_cmpxchg(&task->task_works, &head, work)); in task_work_add()
115 struct callback_head *work; in task_work_cancel_match() local
127 work = READ_ONCE(*pprev); in task_work_cancel_match()
128 while (work) { in task_work_cancel_match()
129 if (!match(work, data)) { in task_work_cancel_match()
130 pprev = &work->next; in task_work_cancel_match()
131 work = READ_ONCE(*pprev); in task_work_cancel_match()
132 } else if (try_cmpxchg(pprev, &work, work->next)) in task_work_cancel_match()
137 return work; in task_work_cancel_match()
197 struct callback_head *work, *head, *next; in task_work_run() local
204 work = READ_ONCE(task->task_works); in task_work_run()
207 if (!work) { in task_work_run()
213 } while (!try_cmpxchg(&task->task_works, &work, head)); in task_work_run()
215 if (!work) in task_work_run()
226 next = work->next; in task_work_run()
227 work->func(work); in task_work_run()
228 work = next; in task_work_run()
230 } while (work); in task_work_run()