Create a memory::paging::entry submodule with an Entry struct

This commit is contained in:
Philipp Oppermann
2017-04-13 18:24:27 +02:00
parent c7c02d7dca
commit c4c27c10e6
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
use memory::Frame;
pub struct Entry(u64);
impl Entry {
pub fn is_unused(&self) -> bool {
self.0 == 0
}
pub fn set_unused(&mut self) {
self.0 = 0;
}
}

View File

@@ -1,5 +1,7 @@
use memory::PAGE_SIZE;
mod entry;
const ENTRY_COUNT: usize = 512;
pub type PhysicalAddress = usize;