Force flush of tables

This commit is contained in:
Jeremy Soller 2017-01-03 14:09:15 -07:00
commit a627cb7fef

View file

@ -26,7 +26,8 @@ impl TemporaryPage {
/// Returns the start address of the temporary page.
pub fn map(&mut self, frame: Frame, flags: EntryFlags, active_table: &mut ActivePageTable) -> VirtualAddress {
assert!(active_table.translate_page(self.page).is_none(), "temporary page is already mapped");
active_table.map_to(self.page, frame, flags);
let result = active_table.map_to(self.page, frame, flags);
result.flush(active_table);
self.page.start_address()
}
@ -38,6 +39,7 @@ impl TemporaryPage {
/// Unmaps the temporary page in the active table.
pub fn unmap(&mut self, active_table: &mut ActivePageTable) {
active_table.unmap(self.page)
let result = active_table.unmap(self.page);
result.flush(active_table);
}
}