Skip to content

Commit 28ce6e4

Browse files
committed
rename MapperFlushRange::flush and add MapperFlushRange::flush_all
1 parent caf85c2 commit 28ce6e4

File tree

1 file changed

+9
-2
lines changed
  • src/structures/paging/mapper

1 file changed

+9
-2
lines changed

src/structures/paging/mapper/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,15 +701,22 @@ impl<S: PageSize> MapperFlushRange<S> {
701701
})
702702
}
703703

704-
/// Flush the page from the TLB to ensure that the newest mapping is used.
704+
/// Flush the pages from the TLB to ensure that the newest mapping is used.
705705
#[cfg(feature = "instructions")]
706706
#[inline]
707-
pub fn flush(self) {
707+
pub fn flush_range(self) {
708708
for page in self.0 {
709709
crate::instructions::tlb::flush(page.start_address())
710710
}
711711
}
712712

713+
/// Flush all pages from the TLB to ensure that the newest mapping is used.
714+
#[cfg(feature = "instructions")]
715+
#[inline]
716+
pub fn flush_all(self) {
717+
crate::instructions::tlb::flush_all()
718+
}
719+
713720
/// Don't flush the TLB and silence the “must be used” warning.
714721
#[inline]
715722
pub fn ignore(self) {}

0 commit comments

Comments
 (0)