142 if (listEntry ==
NULL) {
182 ULONG activeIdleIoMax = 1;
187 &idlePrioritySupported);
190 if (idlePrioritySupported ==
FALSE) {
233 activeIdleIoMax =
max(activeIdleIoMax, 1);
283 mstotimer = (-10) * 1000;
292 FdoData->IdleInterval,
365 (
ULONGLONG)FdoData->LastNonIdleIoTime.QuadPart,
377 idleTime = FdoData->IdleInterval;
418 if (FdoData->ActiveIoCount > 0) {
419 if (CurrentTimeIn !=
NULL) {
420 *CurrentTimeIn =
NULL;
433 if (CurrentTimeIn !=
NULL) {
434 **CurrentTimeIn = CurrentTime;
437 if (idleInterval >= FdoData->IdleInterval) {
486 if (fdoExtension ==
NULL) {
491 fdoData = fdoExtension->PrivateFdoData;
507 pCurrentTime = ¤tTime;
549 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_TIMER,
"ClasspIdleTimerDpc: Starvation timer. Send one idle request\n"));
595 pCurrentTime = ¤tTime;
597 issueRequest =
FALSE;
605 issueRequest =
FALSE;
622 issueRequest =
FALSE;
729 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_TIMER,
"ClasspCompleteIdleRequest: Service next idle reqeusts\n"));
#define CLASSP_REG_SUBKEY_NAME
#define CLASSP_REG_IDLE_ACTIVE_MAX
FORCEINLINE ULONGLONG ClasspTimeDiffToMs(ULONGLONG TimeDiff)
FORCEINLINE LARGE_INTEGER ClasspGetCurrentTime(VOID)
#define CLASSP_REG_IDLE_INTERVAL_NAME
#define CLASS_IDLE_INTERVAL
#define CLASS_STARVATION_INTERVAL
#define CLASS_IDLE_INTERVAL_MIN
#define CLASSP_REG_IDLE_PRIORITY_SUPPORTED
VOID ClasspStartIdleTimer(IN PCLASS_PRIVATE_FDO_DATA FdoData)
PIRP DequeueDeferredClientIrp(PDEVICE_OBJECT Fdo)
PIRP ClasspDequeueIdleRequest(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID ClasspStopIdleTimer(PCLASS_PRIVATE_FDO_DATA FdoData)
VOID ClasspInitializeIdleTimer(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID ClasspServiceIdleRequest(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, BOOLEAN PostToDpc)
ULONGLONG ClasspGetIdleTime(IN PCLASS_PRIVATE_FDO_DATA FdoData, IN LARGE_INTEGER CurrentTime)
VOID EnqueueDeferredClientIrp(PDEVICE_OBJECT Fdo, PIRP Irp)
VOID ClasspCompleteIdleRequest(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
KDEFERRED_ROUTINE ClasspIdleTimerDpc
NTSTATUS ClasspEnqueueIdleRequest(PDEVICE_OBJECT DeviceObject, PIRP Irp)
LOGICAL ClasspIdleDurationSufficient(IN PCLASS_PRIVATE_FDO_DATA FdoData, OUT LARGE_INTEGER **CurrentTimeIn)
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
NTSTATUS ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp, BOOLEAN PostToDpc)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
#define InterlockedCompareExchange
#define Int32x32To64(a, b)
#define UNREFERENCED_PARAMETER(P)
#define TRACE_LEVEL_INFORMATION
LARGE_INTEGER AntiStarvationStartTime
BOOLEAN IdlePrioritySupported
LIST_ENTRY DeferredClientIrpList
USHORT StarvationDuration
BOOLEAN NTAPI KeSetTimerEx(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN LONG Period, IN PKDPC Dpc OPTIONAL)
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define CONTAINING_RECORD(address, type, field)
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_Must_inspect_result_ _In_ WDFDEVICE Fdo
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2