lkml.org 
[lkml]   [2004]   [Jan]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 4 Jan 2004 22:52:24 -0800 (PST)
FromDavide Libenzi <>
SubjectRe: [PATCH 1/2] kthread_create
On Mon, 5 Jan 2004, Rusty Russell wrote:

> > But I think it can be avoided, and actually I 
> > don't know why I did not think about this before. We don't need to return 
> > a struct task_struct* for kthread_create(). We can have:
> > 
> > struct kthread_struct {
> 
> 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.



- 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