Catch the case where the idle loop is entered with interrupts disabled,
causing a hard hang.
This commit is contained in:
parent
001881a134
commit
2773bd509b
@ -735,7 +735,15 @@ cpu_halt(void)
|
|||||||
void
|
void
|
||||||
cpu_idle(void)
|
cpu_idle(void)
|
||||||
{
|
{
|
||||||
/* Insert code to halt (until next interrupt) for the idle loop */
|
/* TODO: Insert code to halt (until next interrupt) */
|
||||||
|
|
||||||
|
#ifdef INVARIANTS
|
||||||
|
if ((mfmsr() & PSL_EE) != PSL_EE) {
|
||||||
|
struct thread *td = curthread;
|
||||||
|
printf("td crit %x\n", td->td_md.md_savecrit);
|
||||||
|
panic("ints disabled in idleproc!");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -735,7 +735,15 @@ cpu_halt(void)
|
|||||||
void
|
void
|
||||||
cpu_idle(void)
|
cpu_idle(void)
|
||||||
{
|
{
|
||||||
/* Insert code to halt (until next interrupt) for the idle loop */
|
/* TODO: Insert code to halt (until next interrupt) */
|
||||||
|
|
||||||
|
#ifdef INVARIANTS
|
||||||
|
if ((mfmsr() & PSL_EE) != PSL_EE) {
|
||||||
|
struct thread *td = curthread;
|
||||||
|
printf("td crit %x\n", td->td_md.md_savecrit);
|
||||||
|
panic("ints disabled in idleproc!");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user