[NTOS]: Another try at the chained interrupt dispatch problem...

svn path=/trunk/; revision=45312
This commit is contained in:
Sir Richard 2010-01-29 02:25:30 +00:00
parent 80e31b74bc
commit 76e22a7c62

View file

@ -274,27 +274,24 @@ KiChainedDispatch(IN PKTRAP_FRAME TrapFrame,
KfLowerIrql(OldIrql); KfLowerIrql(OldIrql);
} }
/* Check if the interrupt got handled */ /* Check if the interrupt got handled and it's level */
if (Handled) if ((Handled) && (Interrupt->Mode == LevelSensitive)) break;
/* What's next? */
NextEntry = NextEntry->Flink;
/* Is this the last one? */
if (NextEntry == ListHead)
{ {
/* Edge shared interrupts are not handled (they never were) */ /* Level should not have gotten here */
ASSERT(Interrupt->Mode == LevelSensitive); if (Interrupt->Mode == LevelSensitive) break;
break;
/* As for edge, we can only exit once nobody can handle the interrupt */
if (!Handled) break;
} }
else
{
/* This code path was never tested, and shouldn't be reached */
DPRINT1("Edge shared interrupt. ReactOS cannot handle these\n");
/* What's next? */ /* Get the interrupt object for the next pass */
NextEntry = NextEntry->Flink; Interrupt = CONTAINING_RECORD(NextEntry, KINTERRUPT, InterruptListEntry);
/* Is this the last one? */
if (NextEntry == ListHead) break;
/* Get the actual interrupt object */
Interrupt = CONTAINING_RECORD(NextEntry, KINTERRUPT, InterruptListEntry);
}
} }
/* Now call the epilogue code */ /* Now call the epilogue code */
@ -431,6 +428,7 @@ KeConnectInterrupt(IN PKINTERRUPT Interrupt)
if (!Interrupt->Connected) if (!Interrupt->Connected)
{ {
/* Get vector dispatching information */ /* Get vector dispatching information */
DPRINT1("Interrupt Connect: %lx %lx %d %d\n", Vector, Irql, Interrupt->ShareVector, Interrupt->Mode);
KiGetVectorDispatch(Vector, &Dispatch); KiGetVectorDispatch(Vector, &Dispatch);
/* Check if the vector is already connected */ /* Check if the vector is already connected */
@ -469,6 +467,7 @@ KeConnectInterrupt(IN PKINTERRUPT Interrupt)
} }
/* Insert into the interrupt list */ /* Insert into the interrupt list */
DPRINT1("Inserting shared interrupt %p into %p with mode: %lx\n", Interrupt, &Dispatch.Interrupt, Interrupt->Mode);
InsertTailList(&Dispatch.Interrupt->InterruptListEntry, InsertTailList(&Dispatch.Interrupt->InterruptListEntry,
&Interrupt->InterruptListEntry); &Interrupt->InterruptListEntry);
} }
@ -487,6 +486,7 @@ KeConnectInterrupt(IN PKINTERRUPT Interrupt)
} }
/* Return to caller */ /* Return to caller */
DPRINT1("Interrupt was registered: %lx\n", Connected);
return Connected; return Connected;
} }