mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Write back dirty pages from cache manager at shutdown.
svn path=/trunk/; revision=4085
This commit is contained in:
parent
79baa4d74c
commit
945450876a
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <internal/io.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/po.h>
|
||||
#include <internal/cc.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
@ -34,12 +35,19 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
|
|||
NTSTATUS STDCALL
|
||||
NtShutdownSystem(IN SHUTDOWN_ACTION Action)
|
||||
{
|
||||
ULONG Count;
|
||||
if (Action > ShutdownPowerOff)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
IoShutdownRegisteredDevices();
|
||||
CmShutdownRegistry();
|
||||
IoShutdownRegisteredFileSystems();
|
||||
/* FIXME: IoShutdownRegisteredFileSystems should unmount the filesystems and
|
||||
this writes back all modified data. This doesn't work at the moment. */
|
||||
CcRosFlushDirtyPages(0xFFFFFFFF, &Count);
|
||||
CcRosFlushDirtyPages(0xFFFFFFFF, &Count);
|
||||
CcRosFlushDirtyPages(0xFFFFFFFF, &Count);
|
||||
|
||||
PiShutdownProcessManager();
|
||||
MiShutdownMemoryManager();
|
||||
|
||||
|
|
Loading…
Reference in a new issue