mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
core: Simplified interrupt event check logic in MainInterruptHandler
This commit is contained in:
parent
5054243bc6
commit
6657a90739
@ -306,23 +306,23 @@ namespace Interrupts
|
||||
#if defined(a86)
|
||||
iEvNum += CPU::x86::IRQ0;
|
||||
#endif
|
||||
if (iEvNum == s_cst(int, Frame->InterruptNumber))
|
||||
if (iEvNum != s_cst(int, Frame->InterruptNumber))
|
||||
continue;
|
||||
|
||||
if (ev.IsHandler)
|
||||
{
|
||||
if (ev.IsHandler)
|
||||
{
|
||||
Handler *hnd = (Handler *)ev.Data;
|
||||
hnd->OnInterruptReceived(Frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ev.Context != nullptr)
|
||||
ev.Callback((CPU::TrapFrame *)ev.Context);
|
||||
else
|
||||
ev.Callback(Frame);
|
||||
}
|
||||
ev.Priority++;
|
||||
InterruptHandled = true;
|
||||
Handler *hnd = (Handler *)ev.Data;
|
||||
hnd->OnInterruptReceived(Frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ev.Context != nullptr)
|
||||
ev.Callback((CPU::TrapFrame *)ev.Context);
|
||||
else
|
||||
ev.Callback(Frame);
|
||||
}
|
||||
ev.Priority++;
|
||||
InterruptHandled = true;
|
||||
}
|
||||
|
||||
CPUData *CoreData = GetCurrentCPU();
|
||||
|
Loading…
x
Reference in New Issue
Block a user