[NTOSKRNL]
[reactos.git] / reactos / ntoskrnl / mm / i386 / page.c
index ea30ce9..4441857 100644 (file)
@@ -146,7 +146,7 @@ ULONG MmProtectToValue[32] =
 
 /* FUNCTIONS ***************************************************************/
 
-BOOLEAN MmUnmapPageTable(PULONG Pt);
+static BOOLEAN MmUnmapPageTable(PULONG Pt);
 
 VOID
 MiFlushTlb(PULONG Pt, PVOID Address)
@@ -326,7 +326,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
     return Pt;
 }
 
-BOOLEAN MmUnmapPageTable(PULONG Pt)
+static BOOLEAN MmUnmapPageTable(PULONG Pt)
 {
     if (!IS_HYPERSPACE(Pt))
     {
@@ -369,69 +369,6 @@ MmGetPfnForProcess(PEPROCESS Process,
     return(PTE_TO_PFN(Entry));
 }
 
-VOID
-NTAPI
-MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
-/*
- * FUNCTION: Delete a virtual mapping
- */
-{
-    BOOLEAN WasValid;
-    ULONG Pte;
-    PULONG Pt;
-
-    Pt = MmGetPageTableForProcess(Process, Address, FALSE);
-    if (Pt == NULL)
-    {
-        KeBugCheck(MEMORY_MANAGEMENT);
-    }
-
-    /*
-     * Atomically disable the present bit and get the old value.
-     */
-    do
-    {
-        Pte = *Pt;
-    } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_PRESENT, Pte));
-
-    MiFlushTlb(Pt, Address);
-
-    WasValid = (Pte & PA_PRESENT);
-    if (!WasValid)
-    {
-        KeBugCheck(MEMORY_MANAGEMENT);
-    }
-
-    /*
-     * Return some information to the caller
-     */
-    if (WasDirty != NULL)
-    {
-        *WasDirty = Pte & PA_DIRTY;
-    }
-    if (Page != NULL)
-    {
-        *Page = PTE_TO_PFN(Pte);
-    }
-}
-
-VOID
-NTAPI
-MmRawDeleteVirtualMapping(PVOID Address)
-{
-    PULONG Pt;
-
-    Pt = MmGetPageTableForProcess(NULL, Address, FALSE);
-    if (Pt && *Pt)
-    {
-        /*
-         * Set the entry to zero
-         */
-        InterlockedExchangePte(Pt, 0);
-        MiFlushTlb(Pt, Address);
-    }
-}
-
 VOID
 NTAPI
 MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,