Rename and use is_unused()

This commit is contained in:
Philipp Oppermann
2015-12-05 01:00:13 +01:00
parent bd05aa7715
commit c52f58cc4c
3 changed files with 3 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ use memory::Frame; // needed later
pub struct Entry(u64);
impl Entry {
pub fn unused(&self) -> bool {
pub fn is_unused(&self) -> bool {
self.0 == 0
}

View File

@@ -4,7 +4,7 @@ use memory::paging::PhysicalAddress;
pub struct Entry(u64);
impl Entry {
pub fn unused(&self) -> bool {
pub fn is_unused(&self) -> bool {
self.0 == 0
}

View File

@@ -19,6 +19,6 @@ pub fn map_to<A>(page: &Page, frame: Frame, flags: EntryFlags, allocator: &mut A
let mut p2 = p3.next_table_create(page.p3_index(), allocator);
let mut p1 = p2.next_table_create(page.p2_index(), allocator);
assert!(!p1[page.p1_index()].flags().contains(PRESENT));
assert!(p1[page.p1_index()].is_unused());
p1[page.p1_index()].set(frame, flags | PRESENT);
}