Lines Matching refs:work
42 int task_work_add(struct task_struct *task, struct callback_head *work, in task_work_add() argument
48 kasan_record_aux_stack(work); in task_work_add()
54 work->next = head; in task_work_add()
55 } while (!try_cmpxchg(&task->task_works, &head, work)); in task_work_add()
91 struct callback_head *work; in task_work_cancel_match() local
103 work = READ_ONCE(*pprev); in task_work_cancel_match()
104 while (work) { in task_work_cancel_match()
105 if (!match(work, data)) { in task_work_cancel_match()
106 pprev = &work->next; in task_work_cancel_match()
107 work = READ_ONCE(*pprev); in task_work_cancel_match()
108 } else if (try_cmpxchg(pprev, &work, work->next)) in task_work_cancel_match()
113 return work; in task_work_cancel_match()
149 struct callback_head *work, *head, *next; in task_work_run() local
156 work = READ_ONCE(task->task_works); in task_work_run()
159 if (!work) { in task_work_run()
165 } while (!try_cmpxchg(&task->task_works, &work, head)); in task_work_run()
167 if (!work) in task_work_run()
178 next = work->next; in task_work_run()
179 work->func(work); in task_work_run()
180 work = next; in task_work_run()
182 } while (work); in task_work_run()