RE: prepare_wait / finish_wait question

From: Linus Torvalds
Date: Wed Nov 12 2003 - 00:34:02 EST



On Tue, 11 Nov 2003, Perez-Gonzalez, Inaky wrote:
>
> What about some safe wake up mechanism like get_task_struct()/__wake_up()/
> put_task_struct()??

A better solution might be to just make the wakeup function take the
required runqueue spinlock first, then remove the task from the list, drop
the wakeup list spinlock, and _then_ do the actual wakeup.

It would require some surgery to the try_to_wake_up() function, though..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/