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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Peter_Vigren

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

Post 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?
.bdjames

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

Post by .bdjames »

hmm, Are you talking about interrupt gates with
respect to task gates?
.bdjames

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

Post 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.
"
Peter_Vigren

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

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

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

Post 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 ;)
Post Reply