Lines Matching refs:task

54 int task_work_add(struct task_struct *task, struct callback_head *work,  in task_work_add()  argument
62 if (WARN_ON_ONCE(task != current)) in task_work_add()
80 head = READ_ONCE(task->task_works); in task_work_add()
85 } while (!try_cmpxchg(&task->task_works, &head, work)); in task_work_add()
91 set_notify_resume(task); in task_work_add()
94 set_notify_signal(task); in task_work_add()
97 __set_notify_signal(task); in task_work_add()
122 task_work_cancel_match(struct task_struct *task, in task_work_cancel_match() argument
126 struct callback_head **pprev = &task->task_works; in task_work_cancel_match()
130 if (likely(!task_work_pending(task))) in task_work_cancel_match()
138 raw_spin_lock_irqsave(&task->pi_lock, flags); in task_work_cancel_match()
147 raw_spin_unlock_irqrestore(&task->pi_lock, flags); in task_work_cancel_match()
169 task_work_cancel_func(struct task_struct *task, task_work_func_t func) in task_work_cancel_func() argument
171 return task_work_cancel_match(task, task_work_func_match, func); in task_work_cancel_func()
189 bool task_work_cancel(struct task_struct *task, struct callback_head *cb) in task_work_cancel() argument
193 ret = task_work_cancel_match(task, task_work_match, cb); in task_work_cancel()
208 struct task_struct *task = current; in task_work_run() local
216 work = READ_ONCE(task->task_works); in task_work_run()
220 if (task->flags & PF_EXITING) in task_work_run()
225 } while (!try_cmpxchg(&task->task_works, &work, head)); in task_work_run()
234 raw_spin_lock_irq(&task->pi_lock); in task_work_run()
235 raw_spin_unlock_irq(&task->pi_lock); in task_work_run()