Sync computers
This commit is contained in:
15
src/fs.rs
15
src/fs.rs
@@ -2,17 +2,12 @@
|
||||
//!
|
||||
//! Implements a minimal disk backend and exposes a global FILE_SYSTEM used by
|
||||
//! the kernel to load user binaries.
|
||||
use core::{
|
||||
cell::{LazyCell, UnsafeCell},
|
||||
ops::Deref,
|
||||
};
|
||||
use core::{cell::UnsafeCell, ops::Deref};
|
||||
|
||||
use bffs::{
|
||||
io::{IoBase, Read, Seek},
|
||||
path::Path,
|
||||
Fat32FileSystem,
|
||||
};
|
||||
use hashbrown::HashMap;
|
||||
|
||||
const DISK_ADDR: *const u8 = 0x9000_0000 as *const _;
|
||||
|
||||
@@ -43,7 +38,7 @@ impl Deref for FSTemp {
|
||||
}
|
||||
}
|
||||
|
||||
pub static FILE_SYSTEM: FSTemp = FSTemp(UnsafeCell::new(None));
|
||||
pub static FAT32_FILE_SYSTEM: FSTemp = FSTemp(UnsafeCell::new(None));
|
||||
|
||||
#[derive(Debug)]
|
||||
/// Simple disk backend that reads from a fixed memory region.
|
||||
@@ -95,9 +90,3 @@ impl Read for Disk {
|
||||
Ok(size)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct KernelFDTable(LazyCell<HashMap<u64, Path<'static>>>);
|
||||
|
||||
unsafe impl Sync for KernelFDTable {}
|
||||
|
||||
pub static KERNEL_FILE_DESCRIPTOR_TABLE: KernelFDTable = KernelFDTable(LazyCell::new(HashMap::new));
|
||||
|
||||
Reference in New Issue
Block a user