[lkml]   [2000]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] pcmcia event thread. (fwd)
David Woodhouse wrote:
> said:
> > In any case, we -really- need a wait_for_kernel_thread_to_die()
> > function.
> up_and_exit() would do it. Or preferably passing the address of the
> semaphore as an extra argument to kernel_thread() in the first place.

Any solution which involves a function being called from a kernel
thread, and/or passing another arg to a kernel thread, is a non-starter
... See the discussion about timer_exit() a while ago. This sort of
thing should be done at a higher level. Not only does that eliminate
any possibility of a race between thread function calling
MOD_DEC_USE_COUNT/up_and_exit and module unload, but it also allows us
to more easily implement wait_for_kernel_thread_to_die() without having
to do silly stuff like pass extra args to threads (...modifying the
thread API in the process).

IMHO it is possible to solve this in a generic way without having to
change the code for every single kernel thread.

Thanks for all the explanation, I think I now understand all the stuff
your kernel thread is doing. Your solution sounds like a decent
solution for the problem described. I have not looked at the socket
driver code observe parse_events() usage, so I cannot say whether your
problem description is accurate however :)


Jeff Garzik |
Building 1024 | The chief enemy of creativity is "good" sense
MandrakeSoft | -- Picasso
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:45    [W:0.125 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site