Lines Matching refs:task
28 task_work_add(struct task_struct *task, struct callback_head *work, bool notify) in task_work_add() argument
33 head = READ_ONCE(task->task_works); in task_work_add()
37 } while (cmpxchg(&task->task_works, head, work) != head); in task_work_add()
40 set_notify_resume(task); in task_work_add()
56 task_work_cancel(struct task_struct *task, task_work_func_t func) in task_work_cancel() argument
58 struct callback_head **pprev = &task->task_works; in task_work_cancel()
62 if (likely(!task->task_works)) in task_work_cancel()
70 raw_spin_lock_irqsave(&task->pi_lock, flags); in task_work_cancel()
77 raw_spin_unlock_irqrestore(&task->pi_lock, flags); in task_work_cancel()
92 struct task_struct *task = current; in task_work_run() local
100 raw_spin_lock_irq(&task->pi_lock); in task_work_run()
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()
106 raw_spin_unlock_irq(&task->pi_lock); in task_work_run()