Lines Matching refs:work
54 int task_work_add(struct task_struct *task, struct callback_head *work, in task_work_add() argument
75 kasan_record_aux_stack_noalloc(work); in task_work_add()
77 kasan_record_aux_stack(work); in task_work_add()
84 work->next = head; in task_work_add()
85 } while (!try_cmpxchg(&task->task_works, &head, work)); in task_work_add()
127 struct callback_head *work; in task_work_cancel_match() local
139 work = READ_ONCE(*pprev); in task_work_cancel_match()
140 while (work) { in task_work_cancel_match()
141 if (!match(work, data)) { in task_work_cancel_match()
142 pprev = &work->next; in task_work_cancel_match()
143 work = READ_ONCE(*pprev); in task_work_cancel_match()
144 } else if (try_cmpxchg(pprev, &work, work->next)) in task_work_cancel_match()
149 return work; in task_work_cancel_match()
209 struct callback_head *work, *head, *next; in task_work_run() local
216 work = READ_ONCE(task->task_works); in task_work_run()
219 if (!work) { in task_work_run()
225 } while (!try_cmpxchg(&task->task_works, &work, head)); in task_work_run()
227 if (!work) in task_work_run()
238 next = work->next; in task_work_run()
239 work->func(work); in task_work_run()
240 work = next; in task_work_run()
242 } while (work); in task_work_run()