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:
David Teller
2016-11-04 13:49:44 +01:00
parent c7735dd177
commit 3aa2f2d0c4
10 changed files with 40 additions and 28 deletions
+3 -2
View File
@@ -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();