Add thread and process states.
Add a thread exit call.
This commit is contained in:
parent
8d87791fa2
commit
a06c9dced4
8 changed files with 78 additions and 9 deletions
|
|
@ -47,3 +47,10 @@ void Thread::Init() {
|
|||
SetRsp0(rsp0_start_);
|
||||
jump_user_space(rip, rsp);
|
||||
}
|
||||
|
||||
void Thread::Exit() {
|
||||
dbgln("[%u.%u] Exiting", pid(), id_);
|
||||
state_ = FINISHED;
|
||||
process_->CheckState();
|
||||
sched::Yield();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue