INFO: Why Is My deviceObject->currentIrp == NULL in My ISR?ID: Q179254
|
This article explains why it is possible for deviceObject->currentIrp == NULL in an ISR.
The only routines in the system that change deviceObject->currentIrp are
IoStartPacket and IoStartNextPacket.
Following code demonstrates approximately what these routines do (ignoring
details of cancels, spinlocks, the Key argument, and so on):
IoStartPacket(dvcObj, Irp)
{
if (dvcObj->DeviceQueue.Busy) {
insert IRP on device queue
} else {
dvcObj->DeviceQueue.Busy = TRUE;
dvcObj->CurrentIrp = Irp;
call StartIo routine (dvcObj, newIrp);
}
}
IoStartNextPacket(dvcObj)
{
dvcObj->CurrentIrp = NULL;
remove IRP from head of queue, store addr in newIrp
if (queue was empty) {
dvcObj->DeviceQueue.Busy = FALSE;
} else {
dvcObj->CurrentIrp = newIrp;
call StartIo routine (dvcObj, newIrp);
}
}
Keywords : kbcode NTDDKKMode
Version : WINNT:4.0
Platform : winnt
Issue type : kbinfo
Last Reviewed: March 5, 1999