Lines Matching refs:work
25 task_work_add(struct task_struct *task, struct callback_head *work, bool notify) in task_work_add() argument
33 work->next = head; in task_work_add()
34 } while (cmpxchg(&task->task_works, head, work) != head); in task_work_add()
56 struct callback_head *work; in task_work_cancel() local
65 while ((work = ACCESS_ONCE(*pprev))) { in task_work_cancel()
67 if (work->func != func) in task_work_cancel()
68 pprev = &work->next; in task_work_cancel()
69 else if (cmpxchg(pprev, work, work->next) == work) in task_work_cancel()
74 return work; in task_work_cancel()
88 struct callback_head *work, *head, *next; in task_work_run() local
96 work = ACCESS_ONCE(task->task_works); in task_work_run()
97 head = !work && (task->flags & PF_EXITING) ? in task_work_run()
99 } while (cmpxchg(&task->task_works, work, head) != work); in task_work_run()
101 if (!work) in task_work_run()
114 next = work->next; in task_work_run()
115 work->next = head; in task_work_run()
116 head = work; in task_work_run()
117 work = next; in task_work_run()
118 } while (work); in task_work_run()
120 work = head; in task_work_run()
122 next = work->next; in task_work_run()
123 work->func(work); in task_work_run()
124 work = next; in task_work_run()
126 } while (work); in task_work_run()