Lines Matching refs:work
28 task_work_add(struct task_struct *task, struct callback_head *work, bool notify) in task_work_add() argument
36 work->next = head; in task_work_add()
37 } while (cmpxchg(&task->task_works, head, work) != head); in task_work_add()
59 struct callback_head *work; in task_work_cancel() local
71 while ((work = READ_ONCE(*pprev))) { in task_work_cancel()
72 if (work->func != func) in task_work_cancel()
73 pprev = &work->next; in task_work_cancel()
74 else if (cmpxchg(pprev, work, work->next) == work) in task_work_cancel()
79 return work; in task_work_cancel()
93 struct callback_head *work, *head, *next; in task_work_run() local
102 work = READ_ONCE(task->task_works); in task_work_run()
103 head = !work && (task->flags & PF_EXITING) ? in task_work_run()
105 } while (cmpxchg(&task->task_works, work, head) != work); in task_work_run()
108 if (!work) in task_work_run()
112 next = work->next; in task_work_run()
113 work->func(work); in task_work_run()
114 work = next; in task_work_run()
116 } while (work); in task_work_run()