6#define RX_SCAVENGER_FINALIZATION_TIME_INTERVAL (10 * 1000 * 1000 * 10)
18#define RxInitializeScavengerEntry(ScavengerEntry) \
19 (ScavengerEntry)->State = 0; \
20 (ScavengerEntry)->Flags = 0; \
21 (ScavengerEntry)->Type = 0; \
22 (ScavengerEntry)->Operation = 0; \
23 InitializeListHead(&(ScavengerEntry)->List); \
24 (ScavengerEntry)->pContinuationEntry = NULL
26#define RxAcquireScavengerMutex() KeWaitForSingleObject(&RxScavengerMutex, Executive, KernelMode, FALSE, NULL)
27#define RxReleaseScavengerMutex() KeReleaseMutex(&RxScavengerMutex, FALSE)
45#define DONT_ATTEMPT_FINALIZE_ON_PURGE FALSE
46#define ATTEMPT_FINALIZE_ON_PURGE TRUE
84#define RxInitializeRdbssScavenger(Scavenger, ScavengerTimeLimit) \
85 (Scavenger)->State = RDBSS_SCAVENGER_INACTIVE; \
86 (Scavenger)->SrvCallsToBeFinalized = 0; \
87 (Scavenger)->NetRootsToBeFinalized = 0; \
88 (Scavenger)->VNetRootsToBeFinalized = 0; \
89 (Scavenger)->FcbsToBeFinalized = 0; \
90 (Scavenger)->SrvOpensToBeFinalized = 0; \
91 (Scavenger)->FobxsToBeFinalized = 0; \
92 (Scavenger)->NumberOfDormantFiles = 0; \
93 (Scavenger)->MaximumNumberOfDormantFiles = 50; \
94 (Scavenger)->CurrentFcbForClosePendingProcessing = NULL; \
95 (Scavenger)->CurrentNetRootForClosePendingProcessing = NULL; \
96 if ((ScavengerTimeLimit).QuadPart == 0) \
98 (Scavenger)->TimeLimit.QuadPart = RX_SCAVENGER_FINALIZATION_TIME_INTERVAL; \
102 (Scavenger)->TimeLimit.QuadPart = (ScavengerTimeLimit).QuadPart; \
104 KeInitializeEvent(&((Scavenger)->SyncEvent), NotificationEvent, FALSE); \
105 KeInitializeEvent(&((Scavenger)->ScavengeEvent), SynchronizationEvent, TRUE); \
106 KeInitializeEvent(&((Scavenger)->ClosePendingProcessingSyncEvent), NotificationEvent, FALSE); \
107 InitializeListHead(&(Scavenger)->SrvCallFinalizationList); \
108 InitializeListHead(&(Scavenger)->NetRootFinalizationList); \
109 InitializeListHead(&(Scavenger)->VNetRootFinalizationList); \
110 InitializeListHead(&(Scavenger)->SrvOpenFinalizationList); \
111 InitializeListHead(&(Scavenger)->FcbFinalizationList); \
112 InitializeListHead(&(Scavenger)->FobxFinalizationList); \
113 InitializeListHead(&(Scavenger)->ClosePendingFobxsList)
133 BOOLEAN SynchronizeWithScavenger);
147#if (_WIN32_WINNT >= 0x0600)
VOID RxSynchronizeWithScavenger(_In_ PRX_CONTEXT RxContext)
BOOLEAN RxScavengeRelatedFobxs(_In_ PFCB Fcb)
VOID RxMarkFobxOnClose(_In_ PFOBX Fobx)
VOID RxInitializePurgeSyncronizationContext(_In_ PPURGE_SYNCHRONIZATION_CONTEXT PurgeSyncronizationContext)
VOID RxMarkFobxOnCleanup(_In_ PFOBX pFobx, _Out_ PBOOLEAN NeedPurge)
struct _PURGE_SYNCHRONIZATION_CONTEXT PURGE_SYNCHRONIZATION_CONTEXT
struct _RX_SCAVENGER_ENTRY * PRX_SCAVENGER_ENTRY
@ RDBSS_SCAVENGER_INACTIVE
@ RDBSS_SCAVENGER_DORMANT
@ RDBSS_SCAVENGER_SUSPENDED
struct _RX_SCAVENGER_ENTRY RX_SCAVENGER_ENTRY
VOID RxScavengeFobxsForNetRoot(PNET_ROOT NetRoot, PFCB PurgingFcb, BOOLEAN SynchronizeWithScavenger)
VOID RxpMarkInstanceForScavengedFinalization(PVOID Instance)
struct _RDBSS_SCAVENGER * PRDBSS_SCAVENGER
struct _PURGE_SYNCHRONIZATION_CONTEXT * PPURGE_SYNCHRONIZATION_CONTEXT
struct _RDBSS_SCAVENGER RDBSS_SCAVENGER
NTSTATUS RxPurgeRelatedFobxs(PNET_ROOT NetRoot, PRX_CONTEXT RxContext, BOOLEAN AttemptFinalization, PFCB PurgingFcb)
VOID RxpUndoScavengerFinalizationMarking(_In_ PVOID Instance)
enum _RDBSS_SCAVENGER_STATE RDBSS_SCAVENGER_STATE
BOOLEAN RxScavengeVNetRoots(_In_ PRDBSS_DEVICE_OBJECT RxDeviceObject)
enum _RDBSS_SCAVENGER_STATE * PRDBSS_SCAVENGER_STATE
LIST_ENTRY ContextsAwaitingPurgeCompletion
PNET_ROOT CurrentNetRootForClosePendingProcessing
ULONG NetRootsToBeFinalized
LIST_ENTRY FobxFinalizationList
ULONG SrvCallsToBeFinalized
LIST_ENTRY ClosePendingFobxsList
PETHREAD CurrentScavengerThread
KEVENT ClosePendingProcessingSyncEvent
volatile LONG NumberOfDormantFiles
LIST_ENTRY VNetRootFinalizationList
PFCB CurrentFcbForClosePendingProcessing
LIST_ENTRY SrvOpenFinalizationList
ULONG SrvOpensToBeFinalized
LONG MaximumNumberOfDormantFiles
LIST_ENTRY FcbFinalizationList
RDBSS_SCAVENGER_STATE State
LIST_ENTRY NetRootFinalizationList
ULONG VNetRootsToBeFinalized
LIST_ENTRY SrvCallFinalizationList
struct _RX_SCAVENGER_ENTRY * pContinuationEntry
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance