Subject: Re: ltsleep while cold
To: Martin Husemann <martin@duskware.de>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 02/02/2005 14:51:57
On Feb 2, 2005, at 12:14 PM, Martin Husemann wrote:

>         /* the wakeup for this is in kbd_was_reset(). */
>         error = tsleep((caddr_t)&ks->kbd_id, PZERO | PCATCH, devopn, 
> hz);
>
> While cold, the (l)tsleep does only bounce spl to give interrupts a 
> chance,
> but does not cause any serious delay.
>
> Now there are several ways to work around/fix this:
>
>  1) remove the wakeup, adjust spl() and just turn the tsleep into a 
> delay(),
>     then restore spl.

Is there actually a wakeup() for this?  If so, then it must be testing 
some condition.  The "after tsleep" case should also test the same 
condition, to guard against spurious wakeups.

-- thorpej