Lines Matching refs:work
27 task_work_add(struct task_struct *task, struct callback_head *work, bool notify) in task_work_add() argument
35 work->next = head; in task_work_add()
36 } while (cmpxchg(&task->task_works, head, work) != head); in task_work_add()
58 struct callback_head *work; in task_work_cancel() local
67 while ((work = ACCESS_ONCE(*pprev))) { in task_work_cancel()
69 if (work->func != func) in task_work_cancel()
70 pprev = &work->next; in task_work_cancel()
71 else if (cmpxchg(pprev, work, work->next) == work) in task_work_cancel()
76 return work; in task_work_cancel()
90 struct callback_head *work, *head, *next; in task_work_run() local
98 work = ACCESS_ONCE(task->task_works); in task_work_run()
99 head = !work && (task->flags & PF_EXITING) ? in task_work_run()
101 } while (cmpxchg(&task->task_works, work, head) != work); in task_work_run()
103 if (!work) in task_work_run()
114 next = work->next; in task_work_run()
115 work->func(work); in task_work_run()
116 work = next; in task_work_run()
118 } while (work); in task_work_run()