ok. I’ve revised my query to be more specific. I’ve
checked OSRs archive, and still have not been able to
come up with an answer.
I have an intermediate filter to my class driver
in this the I have a completion routine that goes as
follows
Please note Points A & B
NTSTATUS cmpltrn (PDEVICE_OBJECT fido, PIRP Irp, PVOID
Context)
{
/* Boiler Plate */
if (Irp->PendingReturned)
IoMarkIrpPending(Irp);
…
MyIoAllocateWorkItem(…) ;
/* Point A */
//note: my own customized function.
//I have my own threads which do the work
return STATUS_MORE_PROCESSING REQUIRED ;
} /*Point B */
VOID mythredfn (PVOID Context)
{
/* pick up IRP from a queue */
/* Do some work
Note: I have not modified the IRP in anyway
*/
IoCompleteRequest(Irp) ;
}
What confuses me is that how can I be sure threadfn
does not call IoCompleteRequest BEFORE completion
routine has moved from Point A To B. I could insert a
sleep in my thread to prevent this problem, but it
brings down performance
Rajeev
Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html