Misc fixes by Thomas.

CORE-4375

svn path=/trunk/; revision=74925
This commit is contained in:
Pierre Schweitzer 2017-06-05 15:54:51 +00:00
parent 3767fcf5cc
commit c91b3835c5
8 changed files with 16 additions and 11 deletions

View file

@ -96,7 +96,7 @@ extern OSSTATUS UDFGetBlockSize(PDEVICE_OBJECT DeviceObject, // the target devic
extern OSSTATUS UDFGetDiskInfo(IN PDEVICE_OBJECT DeviceObject, // the target device object
IN PVCB Vcb); // Volume control block from this DevObj
extern VOID UDFEjectReqWaiter(IN PVOID Context);
extern VOID NTAPI UDFEjectReqWaiter(IN PVOID Context);
extern VOID UDFStopEjectWaiter(PVCB Vcb);
@ -182,4 +182,4 @@ OSSTATUS UDFResetDeviceDriver(IN PVCB Vcb,
IN BOOLEAN Unlock);
#endif //__UDF_PHYS_LIB__H__
#endif //__UDF_PHYS_LIB__H__

View file

@ -686,6 +686,7 @@ UDFDoDelayedClose(
It operates until reach lower threshold
*/
VOID
NTAPI
UDFDelayedClose(
PVOID unused
)

View file

@ -900,7 +900,7 @@ UDFStartEjectWaiter(
// terminates automatically
ASSERT(!(Vcb->VCBFlags & UDF_VCB_FLAGS_STOP_WAITER_EVENT));
Vcb->VCBFlags |= UDF_VCB_FLAGS_STOP_WAITER_EVENT;
ExInitializeWorkItem(&(Vcb->EjectWaiter->EjectReqWorkQueueItem), (PWORKER_THREAD_ROUTINE)UDFEjectReqWaiter, Vcb->EjectWaiter);
ExInitializeWorkItem(&(Vcb->EjectWaiter->EjectReqWorkQueueItem), UDFEjectReqWaiter, Vcb->EjectWaiter);
UDFPrint(("UDFStartEjectWaiter: create thread\n"));
ExQueueWorkItem(&(Vcb->EjectWaiter->EjectReqWorkQueueItem), DelayedWorkQueue);
} else {

View file

@ -1174,7 +1174,7 @@ UDFPostRequest(
KeReleaseSpinLock( &(Vcb->OverflowQueueSpinLock), SavedIrql );
// queue up the request
ExInitializeWorkItem(&(PtrIrpContext->WorkQueueItem), (PWORKER_THREAD_ROUTINE)UDFCommonDispatch, PtrIrpContext);
ExInitializeWorkItem(&(PtrIrpContext->WorkQueueItem), UDFCommonDispatch, PtrIrpContext);
ExQueueWorkItem(&(PtrIrpContext->WorkQueueItem), CriticalWorkQueue);
// ExQueueWorkItem(&(PtrIrpContext->WorkQueueItem), DelayedWorkQueue);
@ -1204,6 +1204,7 @@ UDFPostRequest(
*
*************************************************************************/
VOID
NTAPI
UDFCommonDispatch(
IN PVOID Context // actually is a pointer to IRPContext structure
)

View file

@ -87,7 +87,7 @@ extern ULONG UDFCleanUpFcbChain(IN PVCB Vcb,
extern VOID UDFCloseAllDelayed(PVCB Vcb);
extern VOID UDFDelayedClose(PVOID unused = NULL);
extern VOID NTAPI UDFDelayedClose(PVOID unused = NULL);
extern NTSTATUS UDFCloseAllXXXDelayedInDir(IN PVCB Vcb,
IN PUDF_FILE_INFO FileInfo,
@ -642,7 +642,7 @@ extern NTSTATUS UDFPostRequest(
PtrUDFIrpContext PtrIrpContext,
PIRP Irp);
extern VOID UDFCommonDispatch(
extern VOID NTAPI UDFCommonDispatch(
VOID *Context); // actually an IRPContext structure
extern NTSTATUS UDFInitializeVCB(
@ -756,7 +756,7 @@ extern OSSTATUS UDFGetBlockSize(PDEVICE_OBJECT DeviceObject, // the target devic
extern OSSTATUS UDFGetDiskInfo(IN PDEVICE_OBJECT DeviceObject, // the target device object
IN PVCB Vcb); // Volume control block from this DevObj
extern VOID UDFEjectReqWaiter(IN PVOID Context);
extern VOID NTAPI UDFEjectReqWaiter(IN PVOID Context);
extern VOID UDFStopEjectWaiter(PVCB Vcb);

View file

@ -26,6 +26,7 @@ UDFKeyWaiter(
This routine checks for User Eject request & initiates Dismount
*/
void
NTAPI
UDFEjectReqWaiter(
IN void* Context
)

View file

@ -537,10 +537,12 @@ UDFVForget(
} // end UDFVForget()
VOID
NTAPI
UDFVWorkItem(
PUDF_VERIFY_REQ VerifyReq
PVOID Context
)
{
PUDF_VERIFY_REQ VerifyReq = (PUDF_VERIFY_REQ)Context;
PVCB Vcb = VerifyReq->Vcb;
ULONG ReadBytes;
// OSSTATUS RC;
@ -703,7 +705,7 @@ UDFVVerify(
InterlockedIncrement((PLONG)&(VerifyCtx->QueuedCount));
#ifndef _CONSOLE
ExInitializeWorkItem( &(VerifyReq->VerifyItem),
(PWORKER_THREAD_ROUTINE) UDFVWorkItem,
UDFVWorkItem,
VerifyReq );
ExQueueWorkItem( &(VerifyReq->VerifyItem), CriticalWorkQueue );
#else

View file

@ -179,7 +179,7 @@ DriverEntry(
InitializeListHead( &UDFGlobalData.DirDelayedCloseQueue );
ExInitializeWorkItem( &UDFGlobalData.CloseItem,
(PWORKER_THREAD_ROUTINE) UDFDelayedClose,
UDFDelayedClose,
NULL );
UDFGlobalData.DelayedCloseCount = 0;
@ -312,7 +312,7 @@ DriverEntry(
FsRegistered = TRUE;
UDFPrint(("UDF: IoRegisterFsRegistrationChange()\n"));
IoRegisterFsRegistrationChange( DriverObject, (PDRIVER_FS_NOTIFICATION)UDFFsNotification );
IoRegisterFsRegistrationChange( DriverObject, UDFFsNotification );
// delay.QuadPart = -10000000;
// KeDelayExecutionThread(KernelMode, FALSE, &delay); //10 microseconds