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

This commit is contained in:
Thomas Faber 2018-02-18 12:49:24 +01:00
parent 7a9474a6bb
commit ade345427f
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 10 additions and 8 deletions

View file

@ -50,5 +50,6 @@ ENDM
DEFINE_END_INTERRUPT_WRAPPER HalpEndSoftwareInterrupt, HalpEndSoftwareInterrupt2
DEFINE_END_INTERRUPT_WRAPPER HalEndSystemInterrupt, HalEndSystemInterrupt2
END

View file

@ -1139,9 +1139,9 @@ HalBeginSystemInterrupt(IN KIRQL Irql,
/*
* @implemented
*/
VOID
NTAPI
HalEndSystemInterrupt(IN KIRQL OldIrql,
PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY
FASTCALL
HalEndSystemInterrupt2(IN KIRQL OldIrql,
IN PKTRAP_FRAME TrapFrame)
{
ULONG PendingIrql, PendingIrqlMask, PendingIrqMask;
@ -1156,7 +1156,7 @@ HalEndSystemInterrupt(IN KIRQL OldIrql,
if (PendingIrqlMask)
{
/* Check for in-service delayed interrupt */
if (Pcr->IrrActive & 0xFFFFFFF0) return;
if (Pcr->IrrActive & 0xFFFFFFF0) return NULL;
/* Loop checking for pending interrupts */
while (TRUE)
@ -1172,7 +1172,7 @@ HalEndSystemInterrupt(IN KIRQL OldIrql,
/* Now check if this specific interrupt is already in-service */
PendingIrqMask = (1 << PendingIrql);
if (Pcr->IrrActive & PendingIrqMask) return;
if (Pcr->IrrActive & PendingIrqMask) return NULL;
/* Set active bit otherwise, and clear it from IRR */
Pcr->IrrActive |= PendingIrqMask;
@ -1191,11 +1191,12 @@ HalEndSystemInterrupt(IN KIRQL OldIrql,
else
{
/* Now handle pending software interrupt */
SWInterruptHandlerTable2[PendingIrql](TrapFrame);
UNREACHABLE;
return SWInterruptHandlerTable2[PendingIrql];
}
}
}
return NULL;
}
/* SOFTWARE INTERRUPT TRAPS ***************************************************/