mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
Simply fix up the formatting, there were tabs and 3 spaces and 4 spaces and 2 spaces identation. No code was harmed.
svn path=/trunk/; revision=14997
This commit is contained in:
parent
74d7b0c5f4
commit
264cee75a3
1 changed files with 71 additions and 68 deletions
|
@ -1231,8 +1231,11 @@ IoSecondStageCompletion(PKAPC Apc,
|
||||||
FileObject = (PFILE_OBJECT)(*SystemArgument1);
|
FileObject = (PFILE_OBJECT)(*SystemArgument1);
|
||||||
Irp = CONTAINING_RECORD(Apc, IRP, Tail.Apc);
|
Irp = CONTAINING_RECORD(Apc, IRP, Tail.Apc);
|
||||||
DPRINT("IoSecondStageCompletition, %x\n", Irp);
|
DPRINT("IoSecondStageCompletition, %x\n", Irp);
|
||||||
|
|
||||||
|
/* Save the User Event */
|
||||||
UserEvent = Irp->UserEvent;
|
UserEvent = Irp->UserEvent;
|
||||||
|
|
||||||
|
/* Remember if the IRP is Sync or not */
|
||||||
SyncIrp = Irp->Flags & IRP_SYNCHRONOUS_API ? TRUE : FALSE;
|
SyncIrp = Irp->Flags & IRP_SYNCHRONOUS_API ? TRUE : FALSE;
|
||||||
|
|
||||||
/* Handle Buffered case first */
|
/* Handle Buffered case first */
|
||||||
|
@ -1276,84 +1279,84 @@ IoSecondStageCompletion(PKAPC Apc,
|
||||||
|
|
||||||
if (NT_SUCCESS(Irp->IoStatus.Status) || Irp->PendingReturned)
|
if (NT_SUCCESS(Irp->IoStatus.Status) || Irp->PendingReturned)
|
||||||
{
|
{
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
/* Save the IOSB Information */
|
/* Save the IOSB Information */
|
||||||
*Irp->UserIosb = Irp->IoStatus;
|
*Irp->UserIosb = Irp->IoStatus;
|
||||||
}
|
}
|
||||||
_SEH_HANDLE
|
_SEH_HANDLE
|
||||||
{
|
{
|
||||||
/* Ignore any error */
|
/* Ignore any error */
|
||||||
}
|
}
|
||||||
_SEH_END;
|
_SEH_END;
|
||||||
|
|
||||||
if (FileObject)
|
if (FileObject)
|
||||||
{
|
{
|
||||||
if (FileObject->Flags & FO_SYNCHRONOUS_IO)
|
if (FileObject->Flags & FO_SYNCHRONOUS_IO)
|
||||||
{
|
{
|
||||||
/* Set the Status */
|
/* Set the Status */
|
||||||
FileObject->FinalStatus = Irp->IoStatus.Status;
|
FileObject->FinalStatus = Irp->IoStatus.Status;
|
||||||
|
|
||||||
if (UserEvent != &FileObject->Event)
|
/* FIXME: Remove this check when I/O code is fixed */
|
||||||
{
|
if (UserEvent != &FileObject->Event)
|
||||||
/* Signal Event */
|
{
|
||||||
KeSetEvent(&FileObject->Event, 0, FALSE);
|
/* Signal Event */
|
||||||
}
|
KeSetEvent(&FileObject->Event, 0, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Signal the user event, if one exist */
|
/* Signal the user event, if one exist */
|
||||||
if (UserEvent)
|
if (UserEvent)
|
||||||
{
|
{
|
||||||
KeSetEvent(UserEvent, 0, FALSE);
|
KeSetEvent(UserEvent, 0, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now call the User APC if one was requested */
|
/* Now call the User APC if one was requested */
|
||||||
if (Irp->Overlay.AsynchronousParameters.UserApcRoutine != NULL)
|
if (Irp->Overlay.AsynchronousParameters.UserApcRoutine)
|
||||||
{
|
{
|
||||||
KeInitializeApc(&Irp->Tail.Apc,
|
KeInitializeApc(&Irp->Tail.Apc,
|
||||||
KeGetCurrentThread(),
|
KeGetCurrentThread(),
|
||||||
CurrentApcEnvironment,
|
CurrentApcEnvironment,
|
||||||
IoSecondStageCompletion_KernelApcRoutine,
|
IoSecondStageCompletion_KernelApcRoutine,
|
||||||
IoSecondStageCompletion_RundownApcRoutine,
|
IoSecondStageCompletion_RundownApcRoutine,
|
||||||
(PKNORMAL_ROUTINE)Irp->Overlay.AsynchronousParameters.UserApcRoutine,
|
(PKNORMAL_ROUTINE)Irp->Overlay.AsynchronousParameters.UserApcRoutine,
|
||||||
Irp->RequestorMode,
|
Irp->RequestorMode,
|
||||||
Irp->Overlay.AsynchronousParameters.UserApcContext);
|
Irp->Overlay.AsynchronousParameters.UserApcContext);
|
||||||
|
|
||||||
KeInsertQueueApc(&Irp->Tail.Apc,
|
KeInsertQueueApc(&Irp->Tail.Apc,
|
||||||
Irp->UserIosb,
|
Irp->UserIosb,
|
||||||
NULL,
|
NULL,
|
||||||
2);
|
2);
|
||||||
Irp = NULL;
|
Irp = NULL;
|
||||||
}
|
}
|
||||||
else if (FileObject && FileObject->CompletionContext)
|
else if (FileObject && FileObject->CompletionContext)
|
||||||
{
|
{
|
||||||
/* Call the IO Completion Port if we have one, instead */
|
/* Call the IO Completion Port if we have one, instead */
|
||||||
IoSetIoCompletion(FileObject->CompletionContext->Port,
|
IoSetIoCompletion(FileObject->CompletionContext->Port,
|
||||||
FileObject->CompletionContext->Key,
|
FileObject->CompletionContext->Key,
|
||||||
Irp->Overlay.AsynchronousParameters.UserApcContext,
|
Irp->Overlay.AsynchronousParameters.UserApcContext,
|
||||||
Irp->IoStatus.Status,
|
Irp->IoStatus.Status,
|
||||||
Irp->IoStatus.Information,
|
Irp->IoStatus.Information,
|
||||||
FALSE);
|
FALSE);
|
||||||
Irp = NULL;
|
Irp = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Irp)
|
/* Free the Irp if it hasn't already */
|
||||||
{
|
if (Irp) IoFreeIrp(Irp);
|
||||||
IoFreeIrp(Irp);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FileObject)
|
if (FileObject)
|
||||||
{
|
{
|
||||||
/* Dereference the user event, if it is an event object */
|
/* Dereference the user event, if it is an event object */
|
||||||
if (UserEvent && !SyncIrp && UserEvent != &FileObject->Event)
|
/* FIXME: Remove last check when I/O code is fixed */
|
||||||
{
|
if (UserEvent && !SyncIrp && UserEvent != &FileObject->Event)
|
||||||
ObDereferenceObject(UserEvent);
|
{
|
||||||
}
|
ObDereferenceObject(UserEvent);
|
||||||
|
}
|
||||||
|
|
||||||
/* Dereference the File Object */
|
/* Dereference the File Object */
|
||||||
ObDereferenceObject(FileObject);
|
ObDereferenceObject(FileObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue