![]() | ||||||||||
Messages in this thread |
On Wed, 7 Jan 2004, Rusty Russell wrote: > In message <Pine.LNX.4.44.0401042243510.16042-100000@bigblue.dev.mdolabs.com> you write: > > On Mon, 5 Jan 2004, Rusty Russell wrote: > > > Nope. That's EXACTLY the kind of burden on the caller I wanted to > > > avoid if at all possible. > > > > Which burden? The kthread is a resource and a "struct kthread" is an > > handle to the resource. You create the resource (kthread_create()), you > > control the resource (kthread_start()) and you free the resource > > (kthread_stop()). To me it's simple and clean and does not require hacks > > like taking owerships of tasks and using SIGCLD/waitpid to communicate. > > Anyway, that's your baby and you'll take your choice. > > Thinking more about this issue lead me to rewrite the code to be > simpler to use. Main benefit is that the transition from existing > code is minimal. > > Latest version of patch, and code which uses it. It's actually quite > neat now. Changes since first version: > > 1) kthread_start() deleted in favor of wake_up_process() directly. > 2) New kthread_bind() for just-created threads, to replace original > migration thread open-coded version. > 3) Slight simplification: thread named only if spawned OK. Yes, I like this better. Without any doubt, the removal of sync'd start function simplified things a lot. - Davide - 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/ | |||||||||
| Last update: 2005-03-22 12:59 [from the cache] ©2003-2008 | ||||||||||