diff options
author | J. Bruce Fields <bfields@redhat.com> | 2020-05-06 12:09:34 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2020-05-08 21:23:10 -0400 |
commit | 52782c92ac85c4e393eb4a903a62e6c24afa633f (patch) | |
tree | ff14ce08344fd48a5d6228527bbd949c012a13d4 /include/linux/kthread.h | |
parent | 31fb4bf545e230f2c7db7e64cf012c67a8d374df (diff) |
kthread: save thread function
It's handy to keep the kthread_fn just as a unique cookie to identify
classes of kthreads. E.g. if you can verify that a given task is
running your thread_fn, then you may know what sort of type kthread_data
points to.
We'll use this in nfsd to pass some information into the vfs. Note it
will need kthread_data() exported too.
Original-patch-by: Tejun Heo <tj@kernel.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/kthread.h')
-rw-r--r-- | include/linux/kthread.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 8bbcaad7ef0f..c2a274b79c42 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h @@ -57,6 +57,7 @@ bool kthread_should_stop(void); bool kthread_should_park(void); bool __kthread_should_park(struct task_struct *k); bool kthread_freezable_should_stop(bool *was_frozen); +void *kthread_func(struct task_struct *k); void *kthread_data(struct task_struct *k); void *kthread_probe_data(struct task_struct *k); int kthread_park(struct task_struct *k); |