Create example userspace scheme. Remove kernel duplication of syscalls, use syscall crate instead
This commit is contained in:
parent
941fc0b494
commit
f60661820d
25 changed files with 374 additions and 414 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue