Kernel: Fix broken destruction order for Process/Thread.

This commit is contained in:
Andreas Kling 2019-03-24 01:20:35 +01:00
commit 5713c3a0cb
Notes: sideshowbarker 2024-07-19 14:57:34 +09:00
4 changed files with 7 additions and 4 deletions

View file

@ -72,7 +72,7 @@ bool Scheduler::pick_next()
if (thread.state() == Thread::BlockedWait) {
process.for_each_child([&] (Process& child) {
if (child.state() != Thread::Dead)
if (!child.is_dead())
return true;
if (thread.waitee_pid() == -1 || thread.waitee_pid() == child.pid()) {
thread.m_waitee_pid = child.pid();