Skip to content

Commit 175c9af

Browse files
committed
rename MapperFlushRange::flush and add MapperFlushRange::flush_all
1 parent 3da6f4b commit 175c9af

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
@@ -691,15 +691,22 @@ impl<S: PageSize> MapperFlushRange<S> {
691691
})
692692
}
693693

694-
/// Flush the page from the TLB to ensure that the newest mapping is used.
694+
/// Flush the pages from the TLB to ensure that the newest mapping is used.
695695
#[cfg(feature = "instructions")]
696696
#[inline]
697-
pub fn flush(self) {
697+
pub fn flush_range(self) {
698698
for page in self.0 {
699699
crate::instructions::tlb::flush(page.start_address())
700700
}
701701
}
702702

703+
/// Flush all pages from the TLB to ensure that the newest mapping is used.
704+
#[cfg(feature = "instructions")]
705+
#[inline]
706+
pub fn flush_all(self) {
707+
crate::instructions::tlb::flush_all()
708+
}
709+
703710
/// Don't flush the TLB and silence the “must be used” warning.
704711
#[inline]
705712
pub fn ignore(self) {}

0 commit comments

Comments
 (0)