[HAL] Eliminate tail calls from HalpHardwareInterruptLevel. CORE-14076

This commit is contained in:
Thomas Faber 2018-02-18 12:51:16 +01:00
parent b4453242f7
commit 888ace4397
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 7 additions and 4 deletions

View file

@ -75,5 +75,6 @@ DEFINE_END_INTERRUPT_WRAPPER HalpEndSoftwareInterrupt, HalpEndSoftwareInterrupt2
DEFINE_END_INTERRUPT_WRAPPER HalEndSystemInterrupt, HalEndSystemInterrupt2
DEFINE_INTERRUPT_WRAPPER HalpDispatchInterrupt, HalpDispatchInterrupt2
DEFINE_INTERRUPT_WRAPPER HalpHardwareInterruptLevel, HalpHardwareInterruptLevel2
END

View file

@ -1015,9 +1015,9 @@ HalpDismissIrq07Level(IN KIRQL Irql,
return _HalpDismissIrqLevel(Irql, Irq, OldIrql);
}
VOID
PHAL_SW_INTERRUPT_HANDLER
__cdecl
HalpHardwareInterruptLevel(VOID)
HalpHardwareInterruptLevel2(VOID)
{
PKPCR Pcr = KeGetPcr();
ULONG PendingIrqlMask, PendingIrql;
@ -1027,7 +1027,7 @@ HalpHardwareInterruptLevel(VOID)
if (PendingIrqlMask)
{
/* Check for in-service delayed interrupt */
if (Pcr->IrrActive & 0xFFFFFFF0) return;
if (Pcr->IrrActive & 0xFFFFFFF0) return NULL;
/* Check if pending IRQL affects hardware state */
BitScanReverse(&PendingIrql, PendingIrqlMask);
@ -1036,8 +1036,10 @@ HalpHardwareInterruptLevel(VOID)
Pcr->IRR ^= (1 << PendingIrql);
/* Now handle pending interrupt */
SWInterruptHandlerTable[PendingIrql]();
return SWInterruptHandlerTable[PendingIrql];
}
return NULL;
}
/* SYSTEM INTERRUPTS **********************************************************/