Initialize eflags in fake frame to default value rather than random one.

The random value sometimes causes macro CLKF_USERMODE to return true
because PSL_VM bit is set and really shoudn't be, this causes statclock()
to execute in wrong path, and further breaks KSE code and kernel crashes
when executing threaded program.
This commit is contained in:
David Xu 2003-03-08 03:58:50 +00:00
parent 6b1db7e808
commit 1108975fe0
2 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,7 @@ i386_unpend(void)
frame.cf_cs = SEL_KPL;
frame.cf_eip = (register_t)i386_unpend;
frame.cf_eflags = PSL_KERNEL;
KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0"));
KASSERT((read_eflags() & PSL_I) == 0, ("unpend interrupts enabled1"));
curthread->td_critnest = 1;

View File

@ -94,6 +94,7 @@ i386_unpend(void)
frame.cf_cs = SEL_KPL;
frame.cf_eip = (register_t)i386_unpend;
frame.cf_eflags = PSL_KERNEL;
KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0"));
KASSERT((read_eflags() & PSL_I) == 0, ("unpend interrupts enabled1"));
curthread->td_critnest = 1;