forked from Bananymous/banan-os
Kernel: Add some sanity checks for existanse of threads
This commit is contained in:
parent
fcc2814199
commit
2dec3a6c95
|
@ -293,6 +293,7 @@ namespace Kernel
|
|||
child.exited = true;
|
||||
|
||||
parent.add_pending_signal(SIGCHLD);
|
||||
if (!parent.m_threads.empty())
|
||||
Processor::scheduler().unblock_thread(parent.m_threads.front());
|
||||
|
||||
parent.m_child_exit_blocker.unblock();
|
||||
|
@ -307,6 +308,8 @@ namespace Kernel
|
|||
|
||||
while (!m_threads.empty())
|
||||
m_threads.front()->on_exit();
|
||||
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
size_t Process::proc_meminfo(off_t offset, BAN::ByteSpan buffer) const
|
||||
|
@ -854,6 +857,8 @@ namespace Kernel
|
|||
break;
|
||||
|
||||
process->add_pending_signal(SIGALRM);
|
||||
|
||||
ASSERT(!process->m_threads.empty());
|
||||
Processor::scheduler().unblock_thread(process->m_threads.front());
|
||||
|
||||
s_alarm_processes.remove(s_alarm_processes.begin());
|
||||
|
@ -2004,6 +2009,7 @@ namespace Kernel
|
|||
if (signal)
|
||||
{
|
||||
process.add_pending_signal(signal);
|
||||
if (!process.m_threads.empty())
|
||||
Processor::scheduler().unblock_thread(process.m_threads.front());
|
||||
}
|
||||
return (pid > 0) ? BAN::Iteration::Break : BAN::Iteration::Continue;
|
||||
|
|
Loading…
Reference in New Issue