lkml.org 
[lkml]   [2004]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] kthread_create
Date
In message <Pine.LNX.4.44.0401032039350.2022-100000@bigblue.dev.mdolabs.com> you write:
> > You can get around (2) by having a permenant parent "kthread" thread
> > which is a parent to all the kthreads (it'll get a SIGCHLD when
> > someone does "do_exit()"). But the implementation was pretty ugly,
> > since it involved having a communications mechanism with the kthread
> > parent, which means you have the global ktm_message-like-thing for
> > this...
> You will lose in any case. What happens if the thread does do_exit() and
> you do kthread_stop() after that?

That's illegal. Either your thread exits, or you call kthread_stop().

> With the patch I posted to you, the kthread_stop() will simply miss the
> lookup and return -ENOENT.

Or find some other random kthread which has reused the task struct and
kill that 8(

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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 13:59    [from the cache]
©2003-2011 Jasper Spaans