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()
92 struct callback_head *work; in task_work_cancel_match() local
104 work = READ_ONCE(*pprev); in task_work_cancel_match()
105 while (work) { in task_work_cancel_match()
106 if (!match(work, data)) { in task_work_cancel_match()
107 pprev = &work->next; in task_work_cancel_match()
108 work = READ_ONCE(*pprev); in task_work_cancel_match()
109 } else if (try_cmpxchg(pprev, &work, work->next)) in task_work_cancel_match()
114 return work; in task_work_cancel_match()
150 struct callback_head *work, *head, *next; in task_work_run() local
157 work = READ_ONCE(task->task_works); in task_work_run()
160 if (!work) { in task_work_run()
166 } while (!try_cmpxchg(&task->task_works, &work, head)); in task_work_run()
168 if (!work) in task_work_run()
179 next = work->next; in task_work_run()
180 work->func(work); in task_work_run()
181 work = next; in task_work_run()
183 } while (work); in task_work_run()