summaryrefslogtreecommitdiff
path: root/include/linux/task_work.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <frederic@kernel.org>2024-06-21 11:15:59 +0200
committerPeter Zijlstra <peterz@infradead.org>2024-07-09 13:26:32 +0200
commitf409530e4db9dd11b88cb7703c97c8f326ff6566 (patch)
tree212a4af10e9204f1d4c0abf7cc5a01584347a993 /include/linux/task_work.h
parent68cbd415dd4b9c5b9df69f0f091879e56bf5907a (diff)
task_work: Introduce task_work_cancel() again
Re-introduce task_work_cancel(), this time to cancel an actual callback and not *any* callback pointing to a given function. This is going to be needed for perf events event freeing. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240621091601.18227-3-frederic@kernel.org
Diffstat (limited to 'include/linux/task_work.h')
-rw-r--r--include/linux/task_work.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
index 23ab01ae185e..26b8a47f41fc 100644
--- a/include/linux/task_work.h
+++ b/include/linux/task_work.h
@@ -31,6 +31,7 @@ int task_work_add(struct task_struct *task, struct callback_head *twork,
struct callback_head *task_work_cancel_match(struct task_struct *task,
bool (*match)(struct callback_head *, void *data), void *data);
struct callback_head *task_work_cancel_func(struct task_struct *, task_work_func_t);
+bool task_work_cancel(struct task_struct *task, struct callback_head *cb);
void task_work_run(void);
static inline void exit_task_work(struct task_struct *task)