lkml.org 
[lkml]   [2018]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kthread: Export kthread_data()
Date
When multiple kernel threads are created to cooperatively work on
a common task, we may need a convenient way to access data that are
specific to each kthread.

The kthread_data() function fits this need. However, it was not
visible to kthreads started in a kernel module. To solve this problem,
the kthread_data() function is now exported allowing kthreads from
kernel modules to use it.

Signed-off-by: Waiman Long <longman@redhat.com>
---
kernel/kthread.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/kthread.c b/kernel/kthread.c
index cd50e99..a71d461 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -156,6 +156,7 @@ void *kthread_data(struct task_struct *task)
{
return to_kthread(task)->data;
}
+EXPORT_SYMBOL(kthread_data);

/**
* kthread_probe_data - speculative version of kthread_data()
--
1.8.3.1
\
 
 \ /
  Last update: 2018-02-09 15:52    [W:0.047 / U:2.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site