mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[HAL] Eliminate tail calls from HalEndSystemInterrupt. CORE-14076
This commit is contained in:
parent
7a9474a6bb
commit
ade345427f
2 changed files with 10 additions and 8 deletions
|
@ -50,5 +50,6 @@ ENDM
|
|||
|
||||
|
||||
DEFINE_END_INTERRUPT_WRAPPER HalpEndSoftwareInterrupt, HalpEndSoftwareInterrupt2
|
||||
DEFINE_END_INTERRUPT_WRAPPER HalEndSystemInterrupt, HalEndSystemInterrupt2
|
||||
|
||||
END
|
||||
|
|
|
@ -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 ***************************************************/
|
||||
|
|
Loading…
Reference in a new issue