mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kthread: Export kthread functions
@ 2015-07-24 22:45 David Kershner
  2015-07-24 23:14 ` Neil Horman
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: David Kershner @ 2015-07-24 22:45 UTC (permalink / raw)
  To: akpm
  Cc: tj, laijs, nacc, nhorman, tglx, mingo, linux-kernel,
	jes.sorensen, sparmaintainer, David Kershner

The s-Par visornic driver, currently in staging, processes a queue
being serviced by the an s-Par service partition. We can get a message
that something has happened with the Service Partition, when that
happens, we must not access the channel until we get a message that the
service partition is back again.

The visornic driver has a thread for processing the channel, when we
get the message, we need to be able to park the thread and then resume
it when the problem clears.

We can do this with kthread_park and unpark but they are not exported
from the kernel, this patch exports the needed functions.

Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 kernel/kthread.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/kthread.c b/kernel/kthread.c
index 10e489c..bad80c1 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -97,6 +97,7 @@ bool kthread_should_park(void)
 {
 	return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(current)->flags);
 }
+EXPORT_SYMBOL(kthread_should_park);
 
 /**
  * kthread_freezable_should_stop - should this freezable kthread return now?
@@ -171,6 +172,7 @@ void kthread_parkme(void)
 {
 	__kthread_parkme(to_kthread(current));
 }
+EXPORT_SYMBOL(kthread_parkme);
 
 static int kthread(void *_create)
 {
@@ -411,6 +413,7 @@ void kthread_unpark(struct task_struct *k)
 	if (kthread)
 		__kthread_unpark(k, kthread);
 }
+EXPORT_SYMBOL(kthread_unpark);
 
 /**
  * kthread_park - park a thread created by kthread_create().
@@ -441,6 +444,7 @@ int kthread_park(struct task_struct *k)
 	}
 	return ret;
 }
+EXPORT_SYMBOL(kthread_park);
 
 /**
  * kthread_stop - stop a thread created by kthread_create().
-- 
1.9.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-08-03  2:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 22:45 [PATCH] kthread: Export kthread functions David Kershner
2015-07-24 23:14 ` Neil Horman
2015-07-25 12:05 ` Richard Weinberger
2015-07-26  0:50   ` Kershner, David A
2015-07-26  8:46   ` Thomas Gleixner
2015-07-27 15:45 ` Ingo Molnar
2015-07-27 15:49   ` Neil Horman
2015-07-27 16:01     ` Kershner, David A
2015-07-28 15:59 ` [PATCH v2] " David Kershner
2015-07-28 21:27   ` Andrew Morton
2015-07-29 10:34     ` Thomas Gleixner
2015-07-30  3:48       ` yalin wang
2015-07-30 12:02         ` Neil Horman
2015-07-31  4:16           ` yalin wang
2015-07-31  8:19             ` Thomas Gleixner
2015-07-31 14:14               ` Thomas Gleixner
2015-08-01  7:12                 ` yalin wang
2015-08-01  7:20                   ` Thomas Gleixner
2015-08-01 13:32                   ` Neil Horman
2015-08-03  2:23                     ` yalin wang
2015-08-03  2:42                       ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome