Collapse status of context into one status variable
This commit is contained in:
parent
fbbfe16764
commit
6ad843184d
5 changed files with 19 additions and 16 deletions
|
@ -228,7 +228,7 @@ pub fn clone(flags: usize, stack_base: usize) -> Result<usize> {
|
|||
|
||||
context.arch.set_page_table(unsafe { new_table.address() });
|
||||
|
||||
context.blocked = false;
|
||||
context.status = context::Status::Runnable;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ pub fn exit(status: usize) -> ! {
|
|||
context.image.clear();
|
||||
drop(context.heap.take());
|
||||
drop(context.stack.take());
|
||||
context.exited = true;
|
||||
context.status = context::Status::Exited;
|
||||
}
|
||||
|
||||
unsafe { context::switch(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue