sys: FspTransactThread

This commit is contained in:
Bill Zissimopoulos
2015-11-24 15:59:43 -08:00
parent be204b4118
commit 25f6bd52a7
5 changed files with 104 additions and 1 deletions

View File

@ -174,6 +174,11 @@ VOID FspIoqEnable(FSP_IOQ *Ioq, int Delta)
KeReleaseSpinLock(&Ioq->SpinLock, Irql);
}
PKEVENT FspIoqPendingIrpEvent(FSP_IOQ *Ioq)
{
return &Ioq->PendingIrpEvent;
}
BOOLEAN FspIoqPostIrp(FSP_IOQ *Ioq, PIRP Irp)
{
NTSTATUS Result;
@ -190,7 +195,7 @@ PIRP FspIoqNextPendingIrp(FSP_IOQ *Ioq, ULONG millis)
Timeout.QuadPart = (LONGLONG)millis * 10000;
Result = KeWaitForSingleObject(&Ioq->PendingIrpEvent, Executive, KernelMode, FALSE,
-1 == millis ? 0 : &Timeout);
if (!NT_SUCCESS(Result))
if (STATUS_SUCCESS != Result)
return 0;
}
return IoCsqRemoveNextIrp(&Ioq->PendingIoCsq, (PVOID)1);