Page 1 of 1

Interrupts and Cli and so on in a very long song...

Posted: Fri Jul 19, 2002 4:15 pm
by Peter_Vigren
I read somewhere that when an interrupt is being processed, all other interrupts are automaticly suspended. Like having Cli executed along with Int... Is this true?

Re:Interrupts and Cli and so on in a very long song...

Posted: Fri Jul 19, 2002 5:30 pm
by .bdjames
hmm, Are you talking about interrupt gates with
respect to task gates?

Re:Interrupts and Cli and so on in a very long song...

Posted: Fri Jul 19, 2002 5:34 pm
by .bdjames
"
9.6.1.3
Flags Usage by Interrupt Procedure
Interrupts that vector through either interrupt gates or trap gates cause TF (the trap flag) to be reset after the current value of TF is saved on the stack as part of EFLAGS. By this action the processor prevents debugging activity that uses single-stepping from affecting interrupt response. A subsequent IRET instruction restores TF to the value in the EFLAGS image on the stack. The difference between an interrupt gate and a trap gate is in the effect on IF (the interrupt-enable flag). An interrupt that vectors through an interrupt gate resets IF, thereby preventing other interrupts from interfering with the current interrupt handler. A subsequent IRET instruction restores IF to the value in the EFLAGS image on the stack. An interrupt through a trap gate does not change IF.
"

Re:Interrupts and Cli and so on in a very long song...

Posted: Fri Jul 19, 2002 7:28 pm
by Peter_Vigren
.bdjames wrote: An interrupt that vectors through an interrupt gate resets IF, thereby preventing other interrupts from interfering with the current interrupt handler.
That was what I was looking for. Thanx.

Re:Interrupts and Cli and so on in a very long song...

Posted: Sat Jul 20, 2002 12:17 pm
by Pype.Clicker
Note that in case of real-time systems, nothing prevent you to STI in your handler after you performed critical operations and give the PIC clearance code for some more priviledged interrupts (i.e. clock might interrupt IDE handler so that the time remains correctly computed ;)