Re: sleep_on, wake_up question

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 30 Dec 1999 15:49:44 +0000 (GMT)


> In this case, what good is the sleep_on stuff? Wouldn't the cleaner
> solution be to:
> 1) add an option to signal the wait queue in the wake_up function, if the
> queue is empty (or perhaps even keep it signalled, even if there are
> queued tasks).
> 2) for the sleep_on function, add an option to be immediately awoken if
> entering an already signalled queue (and clear the signal).

But the above you have described is doing the same as a semaphore.

sleep_on() is basically useful for task<->task sleeps

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