within an interrupt handler because we cannot handle any interrupts that
arrive as a result. Enable interrupts only when no process is ready,
which is obviously never the case when we're preempting a process from
within a timer interrupt. The kernel will also panic if we're about to
enable interrupts in getproc() when we're already handling one.
pp->p_page);
#endif
#endif
- /* yes please, interrupts on. */
- ei();
haltafter = getproc_nextp;
/* Take a nap: not that it makes much difference to power on most
Z80 type devices */
if (getproc_nextp == haltafter) {
+ /* we have only one interrupt stack so we can't take interrupts */
+ if(udata.u_ininterrupt)
+ panic("getproc: cannot ei");
+ /* yes please, interrupts on (WRS: they probably are already on?) */
+ ei();
platform_idle();
}
}
{
ptptr p = udata.u_ptab;
- /* yes please, interrupts on. */
- ei();
-
#ifdef DEBUGREALLYHARD
kputs("getproc(");
if (udata.u_ininterrupt)
default:
/* Wait for an I/O operation to let us run, don't run
other tasks */
+ ei();
platform_idle();
}
}