[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070424133450.GA5633@infradead.org>
Date: Tue, 24 Apr 2007 14:34:50 +0100
From: Christoph Hellwig <hch@...radead.org>
To: Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc: Christoph Hellwig <hch@...radead.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andrew Morton <akpm@...ux-foundation.org>,
containers@...ts.osdl.org, Oleg Nesterov <oleg@...sign.ru>,
linux-kernel@...r.kernel.org,
Marcel Holtmann <marcel@...tmann.org>, rusty@...tcorp.com.au
Subject: Re: [PATCH] kthread: Spontaneous exit support
On Tue, Apr 24, 2007 at 03:08:57PM +0200, Jan Engelhardt wrote:
> >I don't think having to parallel APIs is a good idea, people will
> >get utterly confused which one to use. Better always grab a reference
> >in kthread_create and drop it in kthread_stop. For normal thread
> >no change in behaviour and only slightly more code in the slowpath.
>
> I *am* already confused... a driver of mine does:
>
> static __init int thkd_init(void)
> {
> touch_task = kthread_run(touch_thread, Device, "thkd");
> ...
> }
>
> and
>
> static __exit void thkd_exit(void)
> {
> kthread_stop(touch_task);
> /* I bet something is missing */
> }
>
> now what good would kthread_run do me?
Please read the kerneldoc documentation for kthread_create
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists