Hello,
My understanding through some experiment is PendingReturned once set does not get reset to zero. In that case all the upper driver will set its control to SL_PENDING_RETURNED. This can happen in case any driver in the stack makes the IO to synchronous
What’s the use case of SL_PENDING_RETURNED for IoManager? As PendingReturned is already in place.
e.g. IRP passes through following stack
Driver A->Driver B->Driver C->Driver D->Driver E
Driver D
Dispatch:-MarkIrpPending
return Pending
Driver C
Dispatch:-
IoCopyCurrentIrpStacklocation
IoSetCompletionRoutine
Status = IoCallDriver
if (Status == Status_Pending) {
Wait
Status = Irp.Iostatus.Status;
}
IoCompleteRequest
return Status
Driver C Completion Routine:-
Set Event
Status More…P…R
Driver B
Dispatch
IoCopyCurrentIrpStacklocation
IoSetCompletionRoutine
return IoCallDriver
Completion
if (Irp->PendingReturned)
IoMArkPEnding
return Status_success;
Whether APC is queued by IoCompletionRoutine post the last completion routine in the stack?
Whether it makes its decision on PendingReturned or SL_PENDING_RETURNED?
I have gone through
http://www.osronline.com/showThread.cfm?link=89035
http://www.osronline.com/article.cfm?article=83