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