Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752709AbbGIAvb (ORCPT ); Wed, 8 Jul 2015 20:51:31 -0400 Received: from madara.hpl.hp.com ([192.6.19.124]:60632 "EHLO madara.hpl.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbbGIAvZ (ORCPT ); Wed, 8 Jul 2015 20:51:25 -0400 X-Greylist: delayed 642 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 Jul 2015 20:51:24 EDT Date: Wed, 8 Jul 2015 17:40:20 -0700 From: Jean Tourrilhes To: Thomas Gleixner , Rusty Russell Cc: linux-kernel@vger.kernel.org Subject: [PATCH] kthread: export park/unpark facility Message-ID: <20150709004020.GA21087@hpl.hp.com> Reply-To: jt@hpl.hp.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organisation: HP Labs Palo Alto Address: HP Labs, 1U-17, 1501 Page Mill road, Palo Alto, CA 94304, USA. E-mail: jt@hpl.hp.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: 1544 Lines: 52 Hi, The kthread park/unpark facility is not used in the kernel, so one would assume that it's made for kernel modules. This patch should definitely help most modules. Patch untested, at your own risks... Regards, Jean Signed-off-by: Jean Tourrilhes diff -u -p linux-3.18.17/kernel/kthread.j2.c linux-3.18.17/kernel/kthread.c --- linux-3.18.17/kernel/kthread.j2.c 2015-07-08 17:01:39.010554169 -0700 +++ linux-3.18.17/kernel/kthread.c 2015-07-08 17:09:13.016096189 -0700 @@ -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 * 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(). -- 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/