Subject: Re: splbio() difficulties
To: None <briggs@puma.macbsd.com>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: tech-kern
Date: 10/28/1996 21:15:53
> As someone pointed out to me, the sleep/tsleep will normally cause
> someone else to be scheduled. In mountroot(), though, there is just
> proc0 so nothing else will ever get scheduled, and the processor stays
> at splbio, preventing me from getting the required interrupt. Can't we
If there are no processes ready to run, the technique used in all ports
is to spin in an "idle" loop within cpu_switch(). It's the responsibility
of cpu_switch() to make the transit to `spl0' once it's done stashing
away the outgoing process' state. On some processors the "idle loop"
can be entered by a "halt" instruction that causes execution to be
suspended until some external event awakes them. It seems all 68k-based
ports do this.
-pk