kernel/x86: Pin the current thread before calling interrupt handlers.

int_io_* functions do not touch the thread state, but we already have
it here as we will modify its contents later, so it makes more sense
to set this flag here.

This is mostly only relevant following the previous commit, i.e.
finding interrupt handlers that brokenly try to context-switch.
This commit is contained in:
Augustin Cavalier
2019-02-19 21:38:15 -05:00
parent 58ed2965d0
commit 055d49b1fd
+2
View File
@@ -233,7 +233,9 @@ x86_hardware_interrupt(struct iframe* frame)
apic_end_of_interrupt();
}
thread->pinned_to_cpu++;
int_io_interrupt_handler(vector, levelTriggered);
thread->pinned_to_cpu--;
if (levelTriggered) {
if (!sCurrentPIC->end_of_interrupt(vector))