PFILE_OBJECT FileObject = NULL;
PIRP Irp;
PIO_STACK_LOCATION StackPtr;
- KEVENT Event;
NTSTATUS Status;
IO_STATUS_BLOCK IoSB;
{
return(Status);
}
-
- KeInitializeEvent(&Event,NotificationEvent,FALSE);
+ KeResetEvent( &FileObject->Event );
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_FLUSH_BUFFERS,
FileObject->DeviceObject,
NULL,
0,
NULL,
- &Event,
+ &FileObject->Event,
&IoSB);
StackPtr = IoGetNextIrpStackLocation(Irp);
Status = IoCallDriver(FileObject->DeviceObject,Irp);
if (Status==STATUS_PENDING)
{
- KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
+ KeWaitForSingleObject(&FileObject->Event,Executive,KernelMode,FALSE,NULL);
Status = IoSB.Status;
}
if (IoStatusBlock)
-/* $Id: rw.c,v 1.35 2002/04/07 18:36:13 phreak Exp $
+/* $Id: rw.c,v 1.36 2002/04/20 03:46:40 phreak Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
UserMode,
(PVOID*)&FileObject,
NULL);
+ if( !NT_SUCCESS( Status ) )
+ return Status;
+
if (ByteOffset == NULL)
{
ByteOffset = &FileObject->CurrentByteOffset;
KeWaitForSingleObject(ptrEvent,
Executive,
KernelMode,
- FALSE,
+ FileObject->Flags & FO_ALERTABLE_IO ? TRUE : FALSE,
NULL);
Status = IoSB.Status;
}
-/* $Id: vpb.c,v 1.15 2002/04/10 09:57:31 ekohl Exp $
+/* $Id: vpb.c,v 1.16 2002/04/20 03:46:40 phreak Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
PFILE_OBJECT FileObject;
PDEVICE_OBJECT DeviceObject;
PIRP Irp;
- KEVENT Event;
NTSTATUS Status;
PIO_STACK_LOCATION StackPtr;
PVOID SystemBuffer;
DeviceObject = FileObject->DeviceObject;
- KeInitializeEvent(&Event,
- NotificationEvent,
- FALSE);
-
Irp = IoAllocateIrp(DeviceObject->StackSize,
TRUE);
if (Irp == NULL)
}
Irp->AssociatedIrp.SystemBuffer = SystemBuffer;
- Irp->UserEvent = &Event;
+ KeResetEvent( &FileObject->Event );
+ Irp->UserEvent = &FileObject->Event;
Irp->UserIosb = &IoSB;
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
Irp);
if (Status == STATUS_PENDING)
{
- KeWaitForSingleObject(&Event,
+ KeWaitForSingleObject(&FileObject->Event,
UserRequest,
KernelMode,
FALSE,
PIO_STACK_LOCATION StackPtr;
PDEVICE_OBJECT DeviceObject;
PIRP Irp;
- KEVENT Event;
NTSTATUS Status;
assert(FsInformation != NULL);
DeviceObject = FileObject->DeviceObject;
- KeInitializeEvent(&Event,
- NotificationEvent,
- FALSE);
-
Irp = IoAllocateIrp(DeviceObject->StackSize,
TRUE);
if (Irp == NULL)
}
Irp->AssociatedIrp.SystemBuffer = FsInformation;
- Irp->UserEvent = &Event;
+ KeResetEvent( &FileObject->Event );
+ Irp->UserEvent = &FileObject->Event;
Irp->UserIosb = &IoStatusBlock;
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
Irp);
if (Status == STATUS_PENDING)
{
- KeWaitForSingleObject(&Event,
+ KeWaitForSingleObject(&FileObject->Event,
UserRequest,
KernelMode,
FALSE,
PFILE_OBJECT FileObject;
PDEVICE_OBJECT DeviceObject;
PIRP Irp;
- KEVENT Event;
NTSTATUS Status;
PIO_STACK_LOCATION StackPtr;
PVOID SystemBuffer;
DeviceObject = FileObject->DeviceObject;
- KeInitializeEvent(&Event,
- NotificationEvent,
- FALSE);
-
Irp = IoAllocateIrp(DeviceObject->StackSize,TRUE);
if (Irp == NULL)
{
Length);
Irp->AssociatedIrp.SystemBuffer = SystemBuffer;
- Irp->UserEvent = &Event;
+ KeResetEvent( &FileObject->Event );
+ Irp->UserEvent = &FileObject->Event;
Irp->UserIosb = &IoSB;
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
Status = IoCallDriver(DeviceObject,Irp);
if (Status == STATUS_PENDING)
{
- KeWaitForSingleObject(&Event,
+ KeWaitForSingleObject(&FileObject->Event,
UserRequest,
KernelMode,
FALSE,