Page 1 of 1
question regarding interrupt and trap gate?
Posted: Fri Mar 23, 2007 2:21 am
by os64dev
Can somebody explain what de differences between an interrupt gate and a trag gate is? the manuals are not very clear about this, it seems that they behave identical.
regards
Posted: Fri Mar 23, 2007 2:32 am
by mystran
The practical difference is that when you call an interrupt-gate, interrupts get disabled, and when you call a trap-gate, they don't. (edit: well... practical... checked the intel manual and it says there is no other difference whatsoever)
I can't think of a single reason you would "need" to use trap-gates for anything, but then again we've got lots of stuff in x86 you'll never need for anything anyway...
Posted: Fri Mar 23, 2007 5:01 am
by ces_mohab
mystran wrote:I can't think of a single reason you would "need" to use trap-gates for anything, but then again we've got lots of stuff in x86 you'll never need for anything anyway...
I use trap gates for system calls.
Posted: Fri Mar 23, 2007 6:39 am
by mystran
Yeah, well, you can use trap-gates ofcourse, but there's nothing they allow you to do which isn't quite trivially done with interrupt gates...
Basicly, all you save is checking from the pushed flags if interrupts were enabled and enabling them back if this was the case...