Changed back to IoBuildSynchronousFsdRequest.

svn path=/trunk/; revision=14503
This commit is contained in:
Hartmut Birr 2005-04-05 15:51:02 +00:00
parent 2177dfcfd2
commit e1d5086ebf

View file

@ -103,12 +103,13 @@ NtReadFile (IN HANDLE FileHandle,
_SEH_TRY
{
Irp = IoBuildAsynchronousFsdRequest(IRP_MJ_READ,
FileObject->DeviceObject,
Buffer,
Length,
ByteOffset,
IoStatusBlock);
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_READ,
FileObject->DeviceObject,
Buffer,
Length,
ByteOffset,
EventObject,
IoStatusBlock);
}
_SEH_HANDLE
{
@ -130,13 +131,6 @@ NtReadFile (IN HANDLE FileHandle,
return NT_SUCCESS(Status) ? STATUS_INSUFFICIENT_RESOURCES : Status;
}
Irp->UserEvent = EventObject;
if (FileObject->Flags & FO_SYNCHRONOUS_IO)
{
/* synchronous irp's are queued to requestor thread's irp cancel/cleanup list */
IoQueueThreadIrp(Irp);
}
KeClearEvent(&FileObject->Event);
/* Trigger FileObject/Event dereferencing */
@ -283,12 +277,13 @@ NtWriteFile (IN HANDLE FileHandle,
_SEH_TRY
{
Irp = IoBuildAsynchronousFsdRequest(IRP_MJ_WRITE,
FileObject->DeviceObject,
Buffer,
Length,
ByteOffset,
IoStatusBlock);
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_WRITE,
FileObject->DeviceObject,
Buffer,
Length,
ByteOffset,
EventObject,
IoStatusBlock);
}
_SEH_HANDLE
{
@ -310,13 +305,6 @@ NtWriteFile (IN HANDLE FileHandle,
return NT_SUCCESS(Status) ? STATUS_INSUFFICIENT_RESOURCES : Status;
}
Irp->UserEvent = EventObject;
if (FileObject->Flags & FO_SYNCHRONOUS_IO)
{
/* synchronous irp's are queued to requestor thread's irp cancel/cleanup list */
IoQueueThreadIrp(Irp);
}
KeClearEvent(&FileObject->Event);
/* Trigger FileObject/Event dereferencing */