[VFS] Skeleton for moving victoria falls to rust.
This commit is contained in:
parent
59efb1659a
commit
a806e41af0
11 changed files with 130 additions and 3 deletions
|
|
@ -103,6 +103,12 @@ impl MemoryRegion {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> AsRef<T> for MemoryRegion {
|
||||
fn as_ref(&self) -> &T {
|
||||
unsafe { (self.virt_addr as *const T).as_ref().unwrap() }
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for MemoryRegion {
|
||||
fn drop(&mut self) {
|
||||
// FIXME: We shouldn't have to do this manual adjustment.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue