Write back dirty pages from cache manager at shutdown.

svn path=/trunk/; revision=4085
This commit is contained in:
Hartmut Birr 2003-01-30 18:28:10 +00:00
parent 79baa4d74c
commit 945450876a

View file

@ -17,6 +17,7 @@
#include <internal/io.h> #include <internal/io.h>
#include <internal/mm.h> #include <internal/mm.h>
#include <internal/po.h> #include <internal/po.h>
#include <internal/cc.h>
#include <internal/debug.h> #include <internal/debug.h>
@ -34,12 +35,19 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
NTSTATUS STDCALL NTSTATUS STDCALL
NtShutdownSystem(IN SHUTDOWN_ACTION Action) NtShutdownSystem(IN SHUTDOWN_ACTION Action)
{ {
ULONG Count;
if (Action > ShutdownPowerOff) if (Action > ShutdownPowerOff)
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
IoShutdownRegisteredDevices(); IoShutdownRegisteredDevices();
CmShutdownRegistry(); CmShutdownRegistry();
IoShutdownRegisteredFileSystems(); 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(); PiShutdownProcessManager();
MiShutdownMemoryManager(); MiShutdownMemoryManager();