Re: [PATCH 1/2] kthread_create

Davide Libenzi
2003-12-31T07:12:27Z

On Wed, 31 Dec 2003, Srivatsa Vaddagiri wrote:

> On Tue, Dec 30, 2003 at 09:56:05PM -0800, Davide Libenzi wrote:
> > 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?
> >
>
> The messages should not be lost because we take the cpucontrol
> semaphore in kthread_start or kthread_destroy before sending
> a (start or destroy) message.

I see, ok. At that point though, having the message struct inside the task
struct could save the *to pointer and (because of the big lock above), using
barrier and proper order in setting *from and *info, the spin lock. OTOH
the big lock above really make the global message structure private, so it
does not make much difference.

- Davide