https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d793f196df4eb5ca7dcd4b4656f34ad5b611aa50

commit d793f196df4eb5ca7dcd4b4656f34ad5b611aa50
Author:     Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Mon Aug 13 07:42:57 2018 +0200
Commit:     Pierre Schweitzer <pie...@reactos.org>
CommitDate: Mon Aug 13 08:30:17 2018 +0200

    [NTOSKRNL] Stub MM shutdown
---
 ntoskrnl/include/internal/mm.h |  4 ++++
 ntoskrnl/mm/shutdown.c         | 37 +++++++++++++++++++++++++++++++++++++
 ntoskrnl/ntos.cmake            |  1 +
 ntoskrnl/po/poshtdwn.c         |  1 +
 4 files changed, 43 insertions(+)

diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h
index 8d0234b4aa..f7b08a2d0f 100644
--- a/ntoskrnl/include/internal/mm.h
+++ b/ntoskrnl/include/internal/mm.h
@@ -1474,6 +1474,10 @@ NTAPI
 MmSetSessionLocaleId(
     _In_ LCID LocaleId);
 
+/* shutdown.c 
*****************************************************************/
+
+VOID
+MmShutdownSystem(IN ULONG Phase);
 
 /* virtual.c *****************************************************************/
 
diff --git a/ntoskrnl/mm/shutdown.c b/ntoskrnl/mm/shutdown.c
new file mode 100644
index 0000000000..68549983bf
--- /dev/null
+++ b/ntoskrnl/mm/shutdown.c
@@ -0,0 +1,37 @@
+/*
+ * PROJECT:         ReactOS Kernel
+ * LICENSE:         GPL - See COPYING in the top level directory
+ * FILE:            ntoskrnl/mm/shutdown.c
+ * PURPOSE:         Memory Manager Shutdown
+ * PROGRAMMERS:
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+#define MODULE_INVOLVED_IN_ARM3
+#include "ARM3/miarm.h"
+
+/* PRIVATE FUNCTIONS *********************************************************/
+
+VOID
+MiShutdownSystem(VOID)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+MmShutdownSystem(IN ULONG Phase)
+{
+    if (Phase == 0)
+    {
+        MiShutdownSystem();
+    }
+    else
+    {
+        UNIMPLEMENTED;
+    }
+}
diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake
index 94e0dc8055..147691bd4c 100644
--- a/ntoskrnl/ntos.cmake
+++ b/ntoskrnl/ntos.cmake
@@ -226,6 +226,7 @@ list(APPEND SOURCE
     ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/region.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/rmap.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/section.c
+    ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/shutdown.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/ob/devicemap.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/ob/obdir.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/ob/obhandle.c
diff --git a/ntoskrnl/po/poshtdwn.c b/ntoskrnl/po/poshtdwn.c
index 719f8b8b93..070cf67e54 100644
--- a/ntoskrnl/po/poshtdwn.c
+++ b/ntoskrnl/po/poshtdwn.c
@@ -283,6 +283,7 @@ PopGracefulShutdown(IN PVOID Context)
     ExShutdownSystem();
 
     /* Note that modified pages should be written here (MiShutdownSystem) */
+    MmShutdownSystem(0);
 
     /* Flush all user files before we start shutting down IO */
     /* This is where modified pages are written back by the IO manager */

Reply via email to