Skip to content

Commit 82acf51

Browse files
committed
rename MapperFlushRange::flush and add MapperFlushRange::flush_all
1 parent 6f197c7 commit 82acf51

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
@@ -700,15 +700,22 @@ impl<S: PageSize> MapperFlushRange<S> {
700700
})
701701
}
702702

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

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

0 commit comments

Comments
 (0)