Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753908AbbGXXO5 (ORCPT ); Fri, 24 Jul 2015 19:14:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51918 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752723AbbGXXO4 (ORCPT ); Fri, 24 Jul 2015 19:14:56 -0400 Date: Fri, 24 Jul 2015 19:14:53 -0400 From: Neil Horman To: David Kershner Cc: akpm@linux-foundation.org, tj@kernel.org, laijs@cn.fujitsu.com, nacc@linux.vnet.ibm.com, tglx@linutronix.de, mingo@redhat.com, linux-kernel@vger.kernel.org, jes.sorensen@redhat.com, sparmaintainer@unisys.com Subject: Re: [PATCH] kthread: Export kthread functions Message-ID: <20150724231453.GC30741@hmsreliant.think-freely.org> References: <1437777920-31156-1-git-send-email-david.kershner@unisys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437777920-31156-1-git-send-email-david.kershner@unisys.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2266 Lines: 69 On Fri, Jul 24, 2015 at 06:45:20PM -0400, David Kershner wrote: > 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 Given that these functions are visible in the header and part of the kthread_api, I think it makes good sense to do this Acked-by: Neil Horman > --- > 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 > -- 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/