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 9f7c20bacf
commit d16515ea12
10 changed files with 40 additions and 28 deletions

View file

@ -1,14 +1,15 @@
use core::{mem, str};
use core::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
use core::sync::atomic::Ordering;
use spin::Mutex;
use arch::interrupt::irq::acknowledge;
use context;
use scheme::{AtomicSchemeId, ATOMIC_SCHEMEID_INIT};
use syscall::error::*;
use syscall::flag::EVENT_READ;
use syscall::scheme::Scheme;
pub static IRQ_SCHEME_ID: AtomicUsize = ATOMIC_USIZE_INIT;
pub static IRQ_SCHEME_ID: AtomicSchemeId = ATOMIC_SCHEMEID_INIT;
/// IRQ queues
static ACKS: Mutex<[usize; 16]> = Mutex::new([0; 16]);