ReactOS  0.4.12-dev-914-g71f84a3
cmlazy.c File Reference
#include "ntoskrnl.h"
#include "debug.h"
Include dependency graph for cmlazy.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOLEAN NTAPI CmpDoFlushNextHive (_In_ BOOLEAN ForceFlush, _Out_ PBOOLEAN Error, _Out_ PULONG DirtyCount)
 
 _Function_class_ (KDEFERRED_ROUTINE)
 
VOID NTAPI CmpLazyFlush (VOID)
 
 _Function_class_ (WORKER_THREAD_ROUTINE)
 
VOID NTAPI CmpCmdInit (IN BOOLEAN SetupBoot)
 
NTSTATUS NTAPI CmpCmdHiveOpen (IN POBJECT_ATTRIBUTES FileAttributes, IN PSECURITY_CLIENT_CONTEXT ImpersonationContext, IN OUT PBOOLEAN Allocate, OUT PCMHIVE *NewHive, IN ULONG CheckFlags)
 
VOID NTAPI CmpShutdownWorkers (VOID)
 
VOID NTAPI CmSetLazyFlushState (IN BOOLEAN Enable)
 

Variables

KTIMER CmpLazyFlushTimer
 
KDPC CmpLazyFlushDpc
 
WORK_QUEUE_ITEM CmpLazyWorkItem
 
KTIMER CmpEnableLazyFlushTimer
 
KDPC CmpEnableLazyFlushDpc
 
BOOLEAN CmpLazyFlushPending
 
BOOLEAN CmpForceForceFlush
 
BOOLEAN CmpHoldLazyFlush = TRUE
 
ULONG CmpLazyFlushIntervalInSeconds = 5
 
static ULONG CmpLazyFlushHiveCount = 7
 
ULONG CmpLazyFlushCount = 1
 
LONG CmpFlushStarveWriters
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file cmlazy.c.

Function Documentation

◆ _Function_class_() [1/2]

_Function_class_ ( KDEFERRED_ROUTINE  )

Definition at line 127 of file cmlazy.c.

134 {
135  /* Don't stop lazy flushing from happening anymore */
137 }
BOOLEAN CmpHoldLazyFlush
Definition: cmlazy.c:24

◆ _Function_class_() [2/2]

_Function_class_ ( WORKER_THREAD_ROUTINE  )

Definition at line 173 of file cmlazy.c.

177 {
178  BOOLEAN ForceFlush, Result, MoreWork = FALSE;
179  ULONG DirtyCount = 0;
180  PAGED_CODE();
181 
182  /* Don't do anything if lazy flushing isn't enabled yet */
183  if (CmpHoldLazyFlush)
184  {
185  DPRINT1("Lazy flush held. Bye bye.\n");
187  return;
188  }
189 
190  /* Check if we are forcing a flush */
191  ForceFlush = CmpForceForceFlush;
192  if (ForceFlush)
193  {
194  DPRINT("Forcing flush.\n");
195  /* Lock the registry exclusively */
197  }
198  else
199  {
200  DPRINT("Not forcing flush.\n");
201  /* Starve writers before locking */
203  CmpLockRegistry();
204  }
205 
206  /* Flush the next hive */
207  MoreWork = CmpDoFlushNextHive(ForceFlush, &Result, &DirtyCount);
208  if (!MoreWork)
209  {
210  /* We're done */
212  }
213 
214  /* Check if we have starved writers */
215  if (!ForceFlush)
217 
218  /* Not pending anymore, release the registry lock */
221 
222  DPRINT("Lazy flush done. More work to be done: %s. Entries still dirty: %u.\n",
223  MoreWork ? "Yes" : "No", DirtyCount);
224 
225  if (MoreWork)
226  {
227  /* Relaunch the flush timer, so the remaining hives get flushed */
228  CmpLazyFlush();
229  }
230 }
BOOLEAN NTAPI CmpDoFlushNextHive(_In_ BOOLEAN ForceFlush, _Out_ PBOOLEAN Error, _Out_ PULONG DirtyCount)
Definition: cmlazy.c:34
BOOLEAN CmpHoldLazyFlush
Definition: cmlazy.c:24
#define PAGED_CODE()
Definition: video.h:57
LONG CmpFlushStarveWriters
Definition: cmlazy.c:28
unsigned char BOOLEAN
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
void DPRINT(...)
Definition: polytest.cpp:61
VOID NTAPI CmpLockRegistryExclusive(VOID)
Definition: cmsysini.c:1900
BOOLEAN CmpLazyFlushPending
Definition: cmlazy.c:22
VOID NTAPI CmpUnlockRegistry(VOID)
Definition: cmsysini.c:1999
#define InterlockedDecrement
Definition: armddk.h:52
#define InterlockedIncrement
Definition: armddk.h:53
BOOLEAN CmpForceForceFlush
Definition: cmlazy.c:23
#define DPRINT1
Definition: precomp.h:8
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI CmpLazyFlush(VOID)
Definition: cmlazy.c:158
signed int * PLONG
Definition: retypes.h:5
VOID NTAPI CmpLockRegistry(VOID)
Definition: cmsysini.c:1913
ULONG CmpLazyFlushCount
Definition: cmlazy.c:27

◆ CmpCmdHiveOpen()

NTSTATUS NTAPI CmpCmdHiveOpen ( IN POBJECT_ATTRIBUTES  FileAttributes,
IN PSECURITY_CLIENT_CONTEXT  ImpersonationContext,
IN OUT PBOOLEAN  Allocate,
OUT PCMHIVE NewHive,
IN ULONG  CheckFlags 
)

Definition at line 272 of file cmlazy.c.

277 {
281  UCHAR Buffer[sizeof(OBJECT_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR)];
282  ULONG Length = sizeof(Buffer);
284 
285  PAGED_CODE();
286 
287  if (FileAttributes->RootDirectory)
288  {
289  /*
290  * Validity check: The ObjectName is relative to RootDirectory,
291  * therefore it must not start with a path separator.
292  */
293  if (FileAttributes->ObjectName && FileAttributes->ObjectName->Buffer &&
294  FileAttributes->ObjectName->Length >= sizeof(WCHAR) &&
295  *FileAttributes->ObjectName->Buffer == OBJ_NAME_PATH_SEPARATOR)
296  {
298  }
299 
300  /* Try to get the value */
301  Status = ZwQueryObject(FileAttributes->RootDirectory,
303  FileNameInfo,
304  Length,
305  &Length);
306  if (!NT_SUCCESS(Status))
307  {
308  /* Fail */
309  DPRINT1("CmpCmdHiveOpen(): Root directory handle object name query failed, Status = 0x%08lx\n", Status);
310  return Status;
311  }
312 
313  /* Null-terminate and add the length of the terminator */
314  Length -= sizeof(OBJECT_NAME_INFORMATION);
315  FilePath = FileNameInfo->Name.Buffer;
316  FilePath[Length / sizeof(WCHAR)] = UNICODE_NULL;
317  Length += sizeof(UNICODE_NULL);
318 
319  /* Compute the size of the full path; Length already counts the terminating NULL */
320  Length = Length + sizeof(WCHAR) + FileAttributes->ObjectName->Length;
321  if (Length > MAXUSHORT)
322  {
323  /* Name size too long, bail out */
325  }
326 
327  /* Build the full path */
328  RtlInitEmptyUnicodeString(&FileName, NULL, 0);
330  if (!FileName.Buffer)
331  {
332  /* Fail */
333  DPRINT1("CmpCmdHiveOpen(): Unable to allocate memory\n");
335  }
336  FileName.MaximumLength = Length;
337  RtlCopyUnicodeString(&FileName, &FileNameInfo->Name);
338 
339  /*
340  * Append a path terminator if needed (we have already accounted
341  * for a possible extra one when allocating the buffer).
342  */
343  if (/* FileAttributes->ObjectName->Buffer[0] != OBJ_NAME_PATH_SEPARATOR && */ // We excluded ObjectName starting with a path separator above.
344  FileName.Length > 0 && FileName.Buffer[FileName.Length / sizeof(WCHAR) - 1] != OBJ_NAME_PATH_SEPARATOR)
345  {
346  /* ObjectName does not start with '\' and PathBuffer does not end with '\' */
347  FileName.Buffer[FileName.Length / sizeof(WCHAR)] = OBJ_NAME_PATH_SEPARATOR;
348  FileName.Length += sizeof(WCHAR);
349  FileName.Buffer[FileName.Length / sizeof(WCHAR)] = UNICODE_NULL;
350  }
351 
352  /* Append the object name */
354  if (!NT_SUCCESS(Status))
355  {
356  /* Fail */
357  DPRINT1("CmpCmdHiveOpen(): RtlAppendUnicodeStringToString() failed, Status = 0x%08lx\n", Status);
359  return Status;
360  }
361  }
362  else
363  {
364  FileName = *FileAttributes->ObjectName;
365  }
366 
367  /* Open the file in the current security context */
369  0,
370  NewHive,
371  Allocate,
372  CheckFlags);
373  if (((Status == STATUS_ACCESS_DENIED) ||
379  (ImpersonationContext))
380  {
381  /* We failed due to an account/security error, impersonate SYSTEM */
382  Status = SeImpersonateClientEx(ImpersonationContext, NULL);
383  if (NT_SUCCESS(Status))
384  {
385  /* Now try again */
387  0,
388  NewHive,
389  Allocate,
390  CheckFlags);
391 
392  /* Restore impersonation token */
393  PsRevertToSelf();
394  }
395  }
396 
397  if (FileAttributes->RootDirectory)
398  {
400  }
401 
402  /* Return status of open attempt */
403  return Status;
404 }
#define STATUS_WRONG_PASSWORD
Definition: ntstatus.h:328
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
NTKERNELAPI VOID NTAPI PsRevertToSelf(VOID)
Definition: security.c:548
LONG NTSTATUS
Definition: precomp.h:26
uint16_t * PWCHAR
Definition: typedefs.h:54
UNICODE_STRING Name
Definition: nt_native.h:1270
_In_opt_ PALLOCATE_FUNCTION Allocate
Definition: exfuncs.h:656
#define PAGED_CODE()
Definition: video.h:57
#define STATUS_ACCOUNT_EXPIRED
Definition: ntstatus.h:622
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
PCWSTR FilePath
#define STATUS_ACCOUNT_RESTRICTION
Definition: ntstatus.h:332
#define UNICODE_NULL
#define OBJ_NAME_PATH_SEPARATOR
Definition: arcname_tests.c:25
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
Definition: fltkernel.h:1230
#define STATUS_NO_SUCH_USER
Definition: ntstatus.h:322
#define STATUS_ACCOUNT_DISABLED
Definition: ntstatus.h:336
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define MAX_PATH
Definition: compat.h:26
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
unsigned char UCHAR
Definition: xmlstorage.h:181
#define TAG_CM
Definition: cmlib.h:203
NTSTATUS NTAPI CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName, IN ULONG HiveFlags, OUT PCMHIVE *Hive, IN OUT PBOOLEAN New, IN ULONG CheckFlags)
Definition: cmsysini.c:286
NTSTATUS NTAPI SeImpersonateClientEx(IN PSECURITY_CLIENT_CONTEXT ClientContext, IN PETHREAD ServerThread OPTIONAL)
Definition: access.c:589
Status
Definition: gdiplustypes.h:24
struct _FileName FileName
Definition: fatprocs.h:884
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
#define STATUS_OBJECT_PATH_INVALID
Definition: ntstatus.h:279
#define MAXUSHORT
Definition: typedefs.h:81
#define DPRINT1
Definition: precomp.h:8
unsigned int ULONG
Definition: retypes.h:1
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define STATUS_OBJECT_PATH_SYNTAX_BAD
Definition: ntstatus.h:281
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
struct _OBJECT_NAME_INFORMATION * POBJECT_NAME_INFORMATION

Referenced by CmLoadKey().

◆ CmpCmdInit()

VOID NTAPI CmpCmdInit ( IN BOOLEAN  SetupBoot)

Definition at line 234 of file cmlazy.c.

235 {
237  PAGED_CODE();
238 
239  /* Setup the lazy DPC */
240  KeInitializeDpc(&CmpLazyFlushDpc, CmpLazyFlushDpcRoutine, NULL);
241 
242  /* Setup the lazy timer */
244 
245  /* Setup the lazy worker */
246  ExInitializeWorkItem(&CmpLazyWorkItem, CmpLazyFlushWorker, NULL);
247 
248  /* Setup the forced-lazy DPC and timer */
250  CmpEnableLazyFlushDpcRoutine,
251  NULL);
253 
254  /* Enable lazy flushing after 10 minutes */
255  DueTime.QuadPart = Int32x32To64(600, -10 * 1000 * 1000);
257 
258  /* Setup flush variables */
260  CmpWasSetupBoot = SetupBoot;
261 
262  /* Testing: Force Lazy Flushing */
264 
265  /* Setup the hive list if this is not a Setup boot */
266  if (!SetupBoot)
268 }
VOID NTAPI CmpInitializeHiveList(VOID)
Definition: cmsysini.c:1365
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:281
KTIMER CmpLazyFlushTimer
Definition: cmlazy.c:17
_In_ LARGE_INTEGER DueTime
Definition: kefuncs.h:524
KTIMER CmpEnableLazyFlushTimer
Definition: cmlazy.c:20
BOOLEAN CmpHoldLazyFlush
Definition: cmlazy.c:24
#define PAGED_CODE()
Definition: video.h:57
WORK_QUEUE_ITEM CmpLazyWorkItem
Definition: cmlazy.c:19
KDPC CmpLazyFlushDpc
Definition: cmlazy.c:18
smooth NULL
Definition: ftsmooth.c:416
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
Definition: timerobj.c:233
#define ExInitializeWorkItem(Item, Routine, Context)
Definition: exfuncs.h:265
BOOLEAN CmpNoWrite
Definition: cmsysini.c:29
BOOLEAN CmpMiniNTBoot
Definition: cmdata.c:60
BOOLEAN CmpWasSetupBoot
Definition: cmsysini.c:30
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711
#define Int32x32To64(a, b)
LONGLONG QuadPart
Definition: typedefs.h:112
KDPC CmpEnableLazyFlushDpc
Definition: cmlazy.c:21

Referenced by NtInitializeRegistry().

◆ CmpDoFlushNextHive()

BOOLEAN NTAPI CmpDoFlushNextHive ( _In_ BOOLEAN  ForceFlush,
_Out_ PBOOLEAN  Error,
_Out_ PULONG  DirtyCount 
)

Definition at line 34 of file cmlazy.c.

37 {
39  PLIST_ENTRY NextEntry;
42  ULONG HiveCount = CmpLazyFlushHiveCount;
43 
44  /* Set Defaults */
45  *Error = FALSE;
46  *DirtyCount = 0;
47 
48  /* Don't do anything if we're not supposed to */
49  if (CmpNoWrite) return TRUE;
50 
51  /* Make sure we have to flush at least one hive */
52  if (!HiveCount) HiveCount = 1;
53 
54  /* Acquire the list lock and loop */
56  NextEntry = CmpHiveListHead.Flink;
57  while ((NextEntry != &CmpHiveListHead) && HiveCount)
58  {
59  /* Get the hive and check if we should flush it */
60  CmHive = CONTAINING_RECORD(NextEntry, CMHIVE, HiveList);
63  {
64  /* Great sucess! */
65  Result = TRUE;
66 
67  /* One less to flush */
68  HiveCount--;
69 
70  /* Ignore clean or volatile hives */
71  if ((!CmHive->Hive.DirtyCount && !ForceFlush) ||
73  {
74  /* Don't do anything but do update the count */
76  DPRINT("Hive %wZ is clean.\n", &CmHive->FileFullPath);
77  }
78  else
79  {
80  /* Do the sync */
81  DPRINT("Flushing: %wZ\n", &CmHive->FileFullPath);
82  DPRINT("Handle: %p\n", CmHive->FileHandles[HFILE_TYPE_PRIMARY]);
84  if(!NT_SUCCESS(Status))
85  {
86  /* Let them know we failed */
87  DPRINT1("Failed to flush %wZ on handle %p (status 0x%08lx)\n",
89  *Error = TRUE;
90  Result = FALSE;
91  break;
92  }
94  }
95  }
96  else if ((CmHive->Hive.DirtyCount) &&
99  {
100  /* Use another lazy flusher for this hive */
102  *DirtyCount += CmHive->Hive.DirtyCount;
103  DPRINT("CmHive %wZ already uptodate.\n", &CmHive->FileFullPath);
104  }
105 
106  /* Try the next one */
107  NextEntry = NextEntry->Flink;
108  }
109 
110  /* Check if we've flushed everything */
111  if (NextEntry == &CmpHiveListHead)
112  {
113  /* We have, tell the caller we're done */
114  Result = FALSE;
115  }
116  else
117  {
118  /* We need to be called again */
119  Result = TRUE;
120  }
121 
122  /* Unlock the list and return the result */
124  return Result;
125 }
#define TRUE
Definition: types.h:120
LIST_ENTRY CmpHiveListHead
Definition: cmsysini.c:18
#define HIVE_VOLATILE
Definition: hivedata.h:23
LONG NTSTATUS
Definition: precomp.h:26
ULONG FlushCount
Definition: cm.h:432
ULONG DirtyCount
Definition: hivedata.h:305
HANDLE FileHandles[HFILE_TYPE_MAX]
Definition: cm.h:394
unsigned char BOOLEAN
UNICODE_STRING FileFullPath
Definition: cm.h:409
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
HHIVE Hive
Definition: cm.h:393
void DPRINT(...)
Definition: polytest.cpp:61
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
BOOLEAN CmpNoWrite
Definition: cmsysini.c:29
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
BOOL Error
Definition: chkdsk.c:66
BOOLEAN CMAPI HvSyncHive(PHHIVE RegistryHive)
Definition: hivewrt.c:243
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Definition: typedefs.h:117
Status
Definition: gdiplustypes.h:24
FORCEINLINE VOID ExReleasePushLock(PEX_PUSH_LOCK PushLock)
Definition: ex.h:1282
FORCEINLINE VOID ExAcquirePushLockShared(PEX_PUSH_LOCK PushLock)
Definition: ex.h:1091
EX_PUSH_LOCK CmpHiveListHeadLock
Definition: cmdata.c:39
#define HFILE_TYPE_PRIMARY
Definition: hivedata.h:33
ULONG HiveFlags
Definition: hivedata.h:321
static PCMHIVE CmHive
Definition: registry.c:28
static ULONG CmpLazyFlushHiveCount
Definition: cmlazy.c:26
#define HIVE_NOLAZYFLUSH
Definition: hivedata.h:24
#define DPRINT1
Definition: precomp.h:8
unsigned int ULONG
Definition: retypes.h:1
ULONG CmpLazyFlushCount
Definition: cmlazy.c:27
Definition: cm.h:391

Referenced by _Function_class_().

◆ CmpLazyFlush()

VOID NTAPI CmpLazyFlush ( VOID  )

Definition at line 158 of file cmlazy.c.

159 {
161  PAGED_CODE();
162 
163  /* Check if we should set the lazy flush timer */
164  if ((!CmpNoWrite) && (!CmpHoldLazyFlush))
165  {
166  /* Do it */
168  -10 * 1000 * 1000);
170  }
171 }
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:281
KTIMER CmpLazyFlushTimer
Definition: cmlazy.c:17
_In_ LARGE_INTEGER DueTime
Definition: kefuncs.h:524
BOOLEAN CmpHoldLazyFlush
Definition: cmlazy.c:24
#define PAGED_CODE()
Definition: video.h:57
KDPC CmpLazyFlushDpc
Definition: cmlazy.c:18
ULONG CmpLazyFlushIntervalInSeconds
Definition: cmlazy.c:25
BOOLEAN CmpNoWrite
Definition: cmsysini.c:29
#define Int32x32To64(a, b)
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by _Function_class_(), CmpUnlockRegistry(), and NtInitializeRegistry().

◆ CmpShutdownWorkers()

VOID NTAPI CmpShutdownWorkers ( VOID  )

Definition at line 408 of file cmlazy.c.

409 {
410  /* Stop lazy flushing */
411  PAGED_CODE();
413 }
KTIMER CmpLazyFlushTimer
Definition: cmlazy.c:17
#define PAGED_CODE()
Definition: video.h:57
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
Definition: timerobj.c:206

Referenced by CmShutdownSystem().

◆ CmSetLazyFlushState()

VOID NTAPI CmSetLazyFlushState ( IN BOOLEAN  Enable)

Definition at line 417 of file cmlazy.c.

418 {
419  /* Set state for lazy flusher */
421 }
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
BOOLEAN CmpHoldLazyFlush
Definition: cmlazy.c:24

Referenced by NtSetSystemPowerState().

Variable Documentation

◆ CmpEnableLazyFlushDpc

KDPC CmpEnableLazyFlushDpc

Definition at line 21 of file cmlazy.c.

Referenced by CmpCmdInit().

◆ CmpEnableLazyFlushTimer

KTIMER CmpEnableLazyFlushTimer

Definition at line 20 of file cmlazy.c.

Referenced by CmpCmdInit().

◆ CmpFlushStarveWriters

LONG CmpFlushStarveWriters

Definition at line 28 of file cmlazy.c.

Referenced by _Function_class_(), CmpLockRegistry(), and CmpLockRegistryExclusive().

◆ CmpForceForceFlush

BOOLEAN CmpForceForceFlush

Definition at line 23 of file cmlazy.c.

Referenced by _Function_class_(), and CmpDoFlushAll().

◆ CmpHoldLazyFlush

◆ CmpLazyFlushCount

ULONG CmpLazyFlushCount = 1

Definition at line 27 of file cmlazy.c.

Referenced by _Function_class_(), and CmpDoFlushNextHive().

◆ CmpLazyFlushDpc

KDPC CmpLazyFlushDpc

Definition at line 18 of file cmlazy.c.

Referenced by CmpCmdInit(), and CmpLazyFlush().

◆ CmpLazyFlushHiveCount

ULONG CmpLazyFlushHiveCount = 7
static

Definition at line 26 of file cmlazy.c.

Referenced by CmpDoFlushNextHive().

◆ CmpLazyFlushIntervalInSeconds

ULONG CmpLazyFlushIntervalInSeconds = 5

Definition at line 25 of file cmlazy.c.

Referenced by CmpLazyFlush().

◆ CmpLazyFlushPending

BOOLEAN CmpLazyFlushPending

Definition at line 22 of file cmlazy.c.

Referenced by _Function_class_().

◆ CmpLazyFlushTimer

KTIMER CmpLazyFlushTimer

Definition at line 17 of file cmlazy.c.

Referenced by CmpCmdInit(), CmpLazyFlush(), and CmpShutdownWorkers().

◆ CmpLazyWorkItem

WORK_QUEUE_ITEM CmpLazyWorkItem

Definition at line 19 of file cmlazy.c.

Referenced by CmpCmdInit().