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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user