Add exit status to status enum
This commit is contained in:
parent
da9e703c4d
commit
dfbcca99dd
3 changed files with 13 additions and 6 deletions
|
@ -11,7 +11,7 @@ use super::memory::{Memory, SharedMemory};
|
|||
pub enum Status {
|
||||
Runnable,
|
||||
Blocked,
|
||||
Exited
|
||||
Exited(usize)
|
||||
}
|
||||
|
||||
/// A context, which identifies either a process or a thread
|
||||
|
|
|
@ -57,3 +57,7 @@ pub fn contexts() -> RwLockReadGuard<'static, ContextList> {
|
|||
pub fn contexts_mut() -> RwLockWriteGuard<'static, ContextList> {
|
||||
CONTEXTS.call_once(init_contexts).write()
|
||||
}
|
||||
|
||||
pub fn context_id() -> usize {
|
||||
CONTEXT_ID.load(Ordering::SeqCst)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue