Converting scheme ids into a new type SchemeId
Keeping scheme ids (and pids, and file handles, ...) as usize is a footgun. Let's remove it.
This commit is contained in:
parent
9f7c20bacf
commit
d16515ea12
10 changed files with 40 additions and 28 deletions
|
@ -1,16 +1,16 @@
|
|||
use alloc::arc::Arc;
|
||||
use alloc::boxed::Box;
|
||||
use collections::BTreeMap;
|
||||
use core::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
|
||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||
use spin::RwLock;
|
||||
|
||||
use context;
|
||||
use syscall::error::*;
|
||||
use syscall::scheme::Scheme;
|
||||
use scheme;
|
||||
use scheme::{self, AtomicSchemeId, ATOMIC_SCHEMEID_INIT};
|
||||
use scheme::user::{UserInner, UserScheme};
|
||||
|
||||
pub static ROOT_SCHEME_ID: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||
pub static ROOT_SCHEME_ID: AtomicSchemeId = ATOMIC_SCHEMEID_INIT;
|
||||
|
||||
pub struct RootScheme {
|
||||
next_id: AtomicUsize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue