On 2000-Aug-07 14:49:34 -0700, David Greenman <[EMAIL PROTECTED]> wrote:
>   No, that's not true, and there are many examples in the kernel where a
>bogus wakeup would lead to bad things happening. I recall some code in the
>advisory locking code, and VM system, that assume that there is only one
>wakeup event and that the thing causing it assures that certain other
>things have occured before issuing it. That's just the way it has worked
>since the dawn of time.

In the beginning, there was sleep().  The V6, V7, 2.9BSD and 2.11BSD
[which is all I've checked] sources all include the following comment
on sleep():
 * Callers of this routine must be prepared for
 * premature return, and check that the reason for
 * sleeping has gone away.

2.9BSD tsleep() is implemented using sleep() and it's not immediately
obvious that tsleep() won't also return prematurely.  In 2.11BSD,
sleep() is implemented using a tsleep() `"borrowed" from 4.4BSD'.

Presumably a conscious decision was made to change the semantics
between sleep() and tsleep().


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to