--*/
-#include "CdProcs.h"
+#include "cdprocs.h"
//
// The Bug check file id for this module
\f
VOID
+NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
CdFspDispatch (
- IN PIRP_CONTEXT IrpContext
+ _In_ PVOID Context
)
/*++
--*/
{
- THREAD_CONTEXT ThreadContext;
+ THREAD_CONTEXT ThreadContext = {0};
+ PIRP_CONTEXT IrpContext = Context;
NTSTATUS Status;
PIRP Irp = IrpContext->Irp;
while (TRUE) {
- try {
+ _SEH2_TRY {
//
// Reinitialize for the next try at completing this
case IRP_MJ_CLOSE :
- ASSERT( FALSE );
+ NT_ASSERT( FALSE );
break;
case IRP_MJ_READ :
case IRP_MJ_PNP :
- ASSERT( FALSE );
+ NT_ASSERT( FALSE );
CdCommonPnp( IrpContext, Irp );
break;
CdCompleteRequest( IrpContext, Irp, Status );
}
- } except( CdExceptionFilter( IrpContext, GetExceptionInformation() )) {
+ } _SEH2_EXCEPT( CdExceptionFilter( IrpContext, _SEH2_GetExceptionInformation() )) {
- Status = CdProcessException( IrpContext, Irp, GetExceptionCode() );
- }
+ Status = CdProcessException( IrpContext, Irp, _SEH2_GetExceptionCode() );
+ } _SEH2_END;
//
// Break out of the loop if we didn't get CANT_WAIT.
VolDo->OverflowQueueCount -= 1;
Entry = RemoveHeadList( &VolDo->OverflowQueue );
+
+ } else {
+
+ VolDo->PostedRequestCount -= 1;
+
+ Entry = NULL;
}
KeReleaseSpinLock( &VolDo->OverflowQueueSpinLock, SavedIrql );
// the Ex Worker thread.
//
- if (Entry == NULL) { break; }
+ if (Entry == NULL) {
+
+ break;
+ }
//
// Extract the IrpContext , Irp, set wait to TRUE, and loop.
Irp = IrpContext->Irp;
IrpSp = IoGetCurrentIrpStackLocation( Irp );
+ __analysis_assert( IrpSp != 0 );
continue;
}
break;
}
- //
- // Decrement the PostedRequestCount if there was a volume device object.
- //
-
- if (VolDo) {
-
- InterlockedDecrement( &VolDo->PostedRequestCount );
- }
-
return;
}