aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/task_work.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/task_work.h')
-rw-r--r--include/linux/task_work.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
index 5b8a93f288bb..897494b597ba 100644
--- a/include/linux/task_work.h
+++ b/include/linux/task_work.h
@@ -19,6 +19,11 @@ enum task_work_notify_mode {
TWA_SIGNAL,
};
+static inline bool task_work_pending(struct task_struct *task)
+{
+ return READ_ONCE(task->task_works);
+}
+
int task_work_add(struct task_struct *task, struct callback_head *twork,
enum task_work_notify_mode mode);