Hi,
I have several interrupts which when processed signal user mode via a
pending IOCTL.
I want to call the following code in my IsrDpc function. I have a
WdfInterruptAcquireLock( Interrupt ); and ReleaseLock after the following
code, and it creates a deaklock when WdfIoQueueRetrieveNextRequest is
called. My Device Level Synchronization Scope is None and ExecutionLevel
Passive. I am running it on Windows XP 64 bit, with a dual core processor.
First Is this something I shouldn’t be doing in the Dpc? what is the
alternative?
NTSTATUS status = STATUS_UNSUCCESSFUL;
WDFREQUEST currentRequest = NULL;
status = WdfIoQueueRetrieveNextRequest(pDevExt->InterruptQueue,
¤tRequest);
if (NT_SUCCESS(status))
{
PVOID pBuffer;
size_t szBufLength;
status = WdfRequestRetrieveOutputBuffer(currentRequest,
sizeof(pDevExt->CurrentInterruptData), &pBuffer, &szBufLength );
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP, “Could not get the Output Buffer
Required, status %X\n”, status);
WdfRequestCompleteWithInformation(currentRequest,
STATUS_INVALID_PARAMETER, 0);
return;
}
if (pDevExt->bFoundHardware)
{
*((PInterruptStruct)pBuffer) = pDevExt->CurrentInterruptData;
pDevExt->CurrentInterruptData.uiInterruptType = 0;
pDevExt->CurrentInterruptData.uiInterruptStatus = 0;
}
WdfRequestCompleteWithInformation( currentRequest, retStatus,
sizeof(InterruptStruct) );
}