Re: [PATCH 1/2] kthread_create

Rusty Russell
2003-12-31T23:16:41Z

In message <Pine.LNX.4.44.0312302149350.1457-100000@bigblue.dev.mdolabs.com> you write:
> plus eventually a spinlock) of the task struct. But IMO the code would be
> cleaner, since you know who is the target of the message.

<shrug> The code's really not that complicated.

> Also, what happens in the task woke up by a send does not reschedule
> before another CPU does another send? Wouldn't a message be lost?

There's a lock, so only one communication happens at a time, and all
communication is request-response, so it's pretty straightforward.

But an alternate implementation would be to have a "kthread" kernel
thread, which would actually be parent to the kthread threads. This
means it can allocate and clean up, since it catches *all* thread
deaths, including "exit()".

What do you think?
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.