Add a RecursivePageTable::new function

This commit is contained in:
Philipp Oppermann
2015-12-07 02:34:07 +01:00
parent 92194d8354
commit 557738e705

View File

@@ -71,6 +71,13 @@ pub struct RecursivePageTable {
}
impl RecursivePageTable {
pub unsafe fn new() -> RecursivePageTable {
use self::table::P4;
RecursivePageTable {
p4: Unique::new(P4),
}
}
fn p4(&self) -> &Table<Level4> {
unsafe { self.p4.get() }
}