hi,everybody,what i want to do is make interrput not reentrant.
the IRQ0:
Code: Select all
sti
push
mov [var],esp
call PIT_Handler
mov esp,[var]
pop
cli
ret
Actually,it is not all,but it can express what i think
Code: Select all
void PIT_Handler()
{
// Update_Time();
test();
// Scheduler();
Send_EOI(IRQ0); //发送EOI
}
we leave Update_Time and Scheduler,let's see the test
Code: Select all
void test()
{
int i=1;
while(i--){}
}
and here is the keyboard interrupt
Code: Select all
sti
push
mov [var],esp
call KeyBoard_Handler
mov esp,[var]
pop
cli
ret
Now it is okay to press any key,it will display a "**" .But if you make the i=1000 in test ,Some thing goes wrong,what i have debug is proved that in the process of interrupt IRQ0 it is interrupted by the keyboard,I don't know why i have set the sti,it should not be interruted,but it did,and if i=1,it will not.
Is the anything related about the time of the procssing of interrupt.
Thank you inadvance