[Zion] Don't try to set state on dying threads in cleanup.
This commit is contained in:
parent
26ff82cf54
commit
f918966727
|
@ -120,9 +120,11 @@ void Thread::Cleanup() {
|
||||||
// 2. Unblock waiting threads.
|
// 2. Unblock waiting threads.
|
||||||
while (blocked_threads_.size() != 0) {
|
while (blocked_threads_.size() != 0) {
|
||||||
auto thread = blocked_threads_.PopFront();
|
auto thread = blocked_threads_.PopFront();
|
||||||
|
if (!thread->IsDying()) {
|
||||||
thread->SetState(Thread::RUNNABLE);
|
thread->SetState(Thread::RUNNABLE);
|
||||||
gScheduler->Enqueue(thread);
|
gScheduler->Enqueue(thread);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 3. Release Kernel Stack
|
// 3. Release Kernel Stack
|
||||||
KernelVmm::FreeKernelStack(rsp0_start_);
|
KernelVmm::FreeKernelStack(rsp0_start_);
|
||||||
|
|
Loading…
Reference in New Issue