From 50dff1ff8a20cd0b3646172f3f14267909123efe Mon Sep 17 00:00:00 2001 From: Alison Davis Date: Sun, 22 Dec 2024 18:20:55 -0600 Subject: [PATCH] Add MapperFlush method to get page --- src/structures/paging/mapper/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/structures/paging/mapper/mod.rs b/src/structures/paging/mapper/mod.rs index 5db479b8..28c2dff6 100644 --- a/src/structures/paging/mapper/mod.rs +++ b/src/structures/paging/mapper/mod.rs @@ -409,6 +409,12 @@ impl MapperFlush { /// Don't flush the TLB and silence the “must be used” warning. #[inline] pub fn ignore(self) {} + + /// Returns the page to be flushed. + #[inline] + pub fn page(&self) -> Page { + self.0 + } } /// This type represents a change of a page table requiring a complete TLB flush