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
1 changed files with 40 additions and 28 deletions
|
|
@ -1,14 +1,15 @@
|
|||
use core::str;
|
||||
use core::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
use core::sync::atomic::Ordering;
|
||||
use spin::Once;
|
||||
|
||||
use context;
|
||||
use scheme::*;
|
||||
use sync::WaitQueue;
|
||||
use syscall::error::*;
|
||||
use syscall::flag::EVENT_READ;
|
||||
use syscall::scheme::Scheme;
|
||||
|
||||
pub static DEBUG_SCHEME_ID: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||
pub static DEBUG_SCHEME_ID: AtomicSchemeId = ATOMIC_SCHEMEID_INIT;
|
||||
|
||||
/// Input queue
|
||||
static INPUT: Once<WaitQueue<u8>> = Once::new();
|
||||
|
|
|
|||
Loading…
Reference in a new issue