Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 174 of file misc.c.
Referenced by VfatBuildRequest().
{ PVFAT_IRP_CONTEXT IrpContext; /*PIO_STACK_LOCATION Stack;*/ UCHAR MajorFunction; DPRINT ("VfatAllocateIrpContext(DeviceObject %p, Irp %p)\n", DeviceObject, Irp); ASSERT(DeviceObject); ASSERT(Irp); IrpContext = ExAllocateFromNPagedLookasideList(&VfatGlobalData->IrpContextLookasideList); if (IrpContext) { RtlZeroMemory(IrpContext, sizeof(VFAT_IRP_CONTEXT)); IrpContext->Irp = Irp; IrpContext->DeviceObject = DeviceObject; IrpContext->DeviceExt = DeviceObject->DeviceExtension; IrpContext->Stack = IoGetCurrentIrpStackLocation(Irp); ASSERT(IrpContext->Stack); MajorFunction = IrpContext->MajorFunction = IrpContext->Stack->MajorFunction; IrpContext->MinorFunction = IrpContext->Stack->MinorFunction; IrpContext->FileObject = IrpContext->Stack->FileObject; IrpContext->Flags = 0; if (MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL || MajorFunction == IRP_MJ_DEVICE_CONTROL || MajorFunction == IRP_MJ_SHUTDOWN) { IrpContext->Flags |= IRPCONTEXT_CANWAIT; } else if (MajorFunction != IRP_MJ_CLEANUP && MajorFunction != IRP_MJ_CLOSE && IoIsOperationSynchronous(Irp)) { IrpContext->Flags |= IRPCONTEXT_CANWAIT; } KeInitializeEvent(&IrpContext->Event, NotificationEvent, FALSE); IrpContext->RefCount = 0; } return IrpContext; }