[VFS] Skeleton for moving victoria falls to rust.

This commit is contained in:
Drew Galbraith 2025-02-07 18:59:00 -08:00
parent 59efb1659a
commit a806e41af0
11 changed files with 130 additions and 3 deletions

View file

@ -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.