-IoQueueThreadIrp impl.

svn path=/trunk/; revision=6718
This commit is contained in:
Gunnar Dalsnes 2003-11-19 21:12:35 +00:00
parent 9f05e5563f
commit 0cceda5e2b
2 changed files with 18 additions and 2 deletions

View file

@ -1,4 +1,4 @@
/* $Id: buildirp.c,v 1.36 2003/11/16 21:03:59 ekohl Exp $
/* $Id: buildirp.c,v 1.37 2003/11/19 21:11:47 gdalsnes Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -335,6 +335,8 @@ IoBuildDeviceIoControlRequest(ULONG IoControlCode,
break;
}
/* synchronous irp's are queued to requestor thread's irp cancel/cleanup list */
IoQueueThreadIrp(Irp);
return(Irp);
}
@ -386,6 +388,8 @@ IoBuildSynchronousFsdRequest(ULONG MajorFunction,
Irp->UserEvent = Event;
/* synchronous irp's are queued to requestor thread's irp cancel/cleanup list */
IoQueueThreadIrp(Irp);
return(Irp);
}

View file

@ -166,7 +166,7 @@ IoSecondStageCompletion_RundownApcRoutine(
/*
* FUNCTION: Performs the second stage of irp completion for read/write irps
*
* Called as a special kernel APC or directly from IofCompleteRequest()
* Called as a special kernel APC kernel-routine or directly from IofCompleteRequest()
*/
VOID STDCALL
IoSecondStageCompletion(
@ -187,6 +187,18 @@ IoSecondStageCompletion(
Irp = (PIRP)(*SystemArgument1);
PriorityBoost = (CCHAR)(LONG)(*SystemArgument2);
/*
Remove synchronous irp's from the threads cleanup list.
To synchronize with the code inserting the entry, this code must run
at APC_LEVEL, thou this routine is currently (incorrecly?) called at
irql's from 0 to 2.
*/
if (!IsListEmpty(&Irp->ThreadListEntry))
{
RemoveEntryList(&Irp->ThreadListEntry);
InitializeListHead(&Irp->ThreadListEntry);
}
IoStack = &Irp->Stack[(ULONG)Irp->CurrentLocation];
DeviceObject = IoStack->DeviceObject;