mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
Move the I/O completion port setting to second stage and fix the async I/O
test. Thanks to Alex Ionescu for explaining this stuff to me. svn path=/trunk/; revision=12348
This commit is contained in:
@@ -300,5 +300,19 @@ IoSecondStageCompletion(
|
||||
|
||||
}
|
||||
|
||||
if (NULL != IoStack->FileObject
|
||||
&& NULL != IoStack->FileObject->CompletionContext
|
||||
&& (0 != (Irp->Flags & IRP_SYNCHRONOUS_API)
|
||||
|| 0 == (IoStack->FileObject->Flags & FO_SYNCHRONOUS_IO)))
|
||||
{
|
||||
PFILE_OBJECT FileObject = IoStack->FileObject;
|
||||
IoSetIoCompletion(FileObject->CompletionContext->Port,
|
||||
FileObject->CompletionContext->Key,
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext,
|
||||
Irp->IoStatus.Status,
|
||||
Irp->IoStatus.Information,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
IoFreeIrp(Irp);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: irp.c,v 1.71 2004/12/26 15:55:14 gvg Exp $
|
||||
/* $Id: irp.c,v 1.72 2004/12/26 21:18:34 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -447,19 +447,6 @@ IofCompleteRequest(PIRP Irp,
|
||||
//Windows NT File System Internals, page 154
|
||||
OriginalFileObject = Irp->Tail.Overlay.OriginalFileObject;
|
||||
|
||||
if (NULL != Stack->FileObject
|
||||
&& NULL != Stack->FileObject->CompletionContext
|
||||
&& Irp->PendingReturned)
|
||||
{
|
||||
PFILE_OBJECT FileObject = Stack->FileObject;
|
||||
IoSetIoCompletion(FileObject->CompletionContext->Port,
|
||||
FileObject->CompletionContext->Key,
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext,
|
||||
Irp->IoStatus.Status,
|
||||
Irp->IoStatus.Information,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
if (Irp->PendingReturned || KeGetCurrentIrql() == DISPATCH_LEVEL)
|
||||
{
|
||||
BOOLEAN bStatus;
|
||||
|
||||
Reference in New Issue
Block a user