mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +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);
|
Hive = CONTAINING_RECORD(NextEntry, CMHIVE, HiveList);
|
||||||
if (!(Hive->Hive.HiveFlags & HIVE_NOLAZYFLUSH))
|
if (!(Hive->Hive.HiveFlags & HIVE_NOLAZYFLUSH))
|
||||||
{
|
{
|
||||||
|
/* Acquire the flusher lock */
|
||||||
|
ExAcquirePushLockExclusive((PVOID)&Hive->FlusherLock);
|
||||||
|
|
||||||
/* Do the sync */
|
/* Do the sync */
|
||||||
Status = HvSyncHive(&Hive->Hive);
|
Status = HvSyncHive(&Hive->Hive);
|
||||||
if (!NT_SUCCESS(Status)) Result = FALSE;
|
if (!NT_SUCCESS(Status)) Result = FALSE;
|
||||||
|
|
||||||
|
/* Release the flusher lock */
|
||||||
|
ExReleasePushLock((PVOID)&Hive->FlusherLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try the next entry */
|
/* Try the next entry */
|
||||||
|
|
|
@ -30,6 +30,8 @@ BOOLEAN CmpNoWrite;
|
||||||
BOOLEAN CmpForceForceFlush;
|
BOOLEAN CmpForceForceFlush;
|
||||||
BOOLEAN CmpWasSetupBoot;
|
BOOLEAN CmpWasSetupBoot;
|
||||||
|
|
||||||
|
extern BOOLEAN CmFirstTime;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -1647,7 +1649,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CmShutdownSystem(VOID)
|
CmShutdownSystem(VOID)
|
||||||
{
|
{
|
||||||
/* Kill the workers and fush all hives */
|
/* Kill the workers and flush all hives */
|
||||||
CmpShutdownWorkers();
|
if (!CmFirstTime) CmpShutdownWorkers();
|
||||||
CmpDoFlushAll(TRUE);
|
CmpDoFlushAll(TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue