aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorFrederic Weisbecker <[email protected]>2024-06-21 11:15:59 +0200
committerPeter Zijlstra <[email protected]>2024-07-09 13:26:32 +0200
commitf409530e4db9dd11b88cb7703c97c8f326ff6566 (patch)
tree212a4af10e9204f1d4c0abf7cc5a01584347a993 /include/linux
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/linux')
-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)