Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752141AbbG1QG2 (ORCPT ); Tue, 28 Jul 2015 12:06:28 -0400 Received: from mail1.bemta8.messagelabs.com ([216.82.243.198]:25267 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbbG1QG0 (ORCPT ); Tue, 28 Jul 2015 12:06:26 -0400 X-Greylist: delayed 424 seconds by postgrey-1.27 at vger.kernel.org; Tue, 28 Jul 2015 12:06:26 EDT X-Env-Sender: David.Kershner@unisys.com X-Msg-Ref: server-3.tower-46.messagelabs.com!1438099148!44979198!1 X-Originating-IP: [192.61.61.105] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked From: David Kershner To: CC: , , , , , , , , , David Kershner Subject: [PATCH v2] kthread: Export kthread functions Date: Tue, 28 Jul 2015 11:59:01 -0400 Message-ID: <1438099141-8614-1-git-send-email-david.kershner@unisys.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437777920-31156-1-git-send-email-david.kershner@unisys.com> References: <1437777920-31156-1-git-send-email-david.kershner@unisys.com> X-OriginalArrivalTime: 28 Jul 2015 15:59:07.0771 (UTC) FILETIME=[55CA7CB0:01D0C94E] MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1934 Lines: 62 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 --- kernel/kthread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/kthread.c b/kernel/kthread.c index 10e489c..fdea0be 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_GPL(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_GPL(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_GPL(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_GPL(kthread_park); /** * kthread_stop - stop a thread created by kthread_create(). -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/