Skip to content

Commit 9a3374b

Browse files
committed
rename MapperFlushRange::flush and add MapperFlushRange::flush_all
1 parent 637c31a commit 9a3374b

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
@@ -689,15 +689,22 @@ impl<S: PageSize> MapperFlushRange<S> {
689689
})
690690
}
691691

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

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

0 commit comments

Comments
 (0)