mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:05:50 +00:00
- Do CmpShutdownWorkers only when the registry was actually initialized.
- Guard HvSyncHive with a flusher lock in CmpDoFlushAll. - Misc typo fixes / spaces cleanup in cmlazy.c. svn path=/trunk/; revision=31430
This commit is contained in:
parent
c60950760b
commit
13db85781b
3 changed files with 16 additions and 8 deletions
|
@ -38,9 +38,15 @@ CmpDoFlushAll(IN BOOLEAN ForceFlush)
|
|||
Hive = CONTAINING_RECORD(NextEntry, CMHIVE, HiveList);
|
||||
if (!(Hive->Hive.HiveFlags & HIVE_NOLAZYFLUSH))
|
||||
{
|
||||
/* Acquire the flusher lock */
|
||||
ExAcquirePushLockExclusive((PVOID)&Hive->FlusherLock);
|
||||
|
||||
/* Do the sync */
|
||||
Status = HvSyncHive(&Hive->Hive);
|
||||
if (!NT_SUCCESS(Status)) Result = FALSE;
|
||||
|
||||
/* Release the flusher lock */
|
||||
ExReleasePushLock((PVOID)&Hive->FlusherLock);
|
||||
}
|
||||
|
||||
/* Try the next entry */
|
||||
|
|
|
@ -30,6 +30,8 @@ BOOLEAN CmpNoWrite;
|
|||
BOOLEAN CmpForceForceFlush;
|
||||
BOOLEAN CmpWasSetupBoot;
|
||||
|
||||
extern BOOLEAN CmFirstTime;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
|
@ -1647,7 +1649,7 @@ VOID
|
|||
NTAPI
|
||||
CmShutdownSystem(VOID)
|
||||
{
|
||||
/* Kill the workers and fush all hives */
|
||||
CmpShutdownWorkers();
|
||||
/* Kill the workers and flush all hives */
|
||||
if (!CmFirstTime) CmpShutdownWorkers();
|
||||
CmpDoFlushAll(TRUE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue