Create example userspace scheme. Remove kernel duplication of syscalls, use syscall crate instead

This commit is contained in:
Jeremy Soller 2016-09-20 16:23:28 -06:00
parent 941fc0b494
commit f60661820d
25 changed files with 374 additions and 414 deletions

View file

@ -5,7 +5,7 @@ use core::sync::atomic::Ordering;
use spin::RwLock;
use arch;
use syscall::{Result, Error};
use syscall::error::{Result, Error, EAGAIN};
use super::context::Context;
/// Context list type
@ -48,7 +48,7 @@ impl ContextList {
}
if self.next_id >= super::CONTEXT_MAX_CONTEXTS {
return Err(Error::TryAgain);
return Err(Error::new(EAGAIN));
}
let id = self.next_id;