Kernel: Fix Process::exit() and where it is called from

cksum doesn't seem to work anymore on big files. I have to look
into this. It locks up after couple of seconds...
This commit is contained in:
2023-04-19 12:52:21 +03:00
parent 160315c4d0
commit fd81e31050
2 changed files with 16 additions and 4 deletions
+3 -1
View File
@@ -245,7 +245,8 @@ namespace Kernel
void Scheduler::set_current_process_done()
{
VERIFY_CLI();
VERIFY_STI();
DISABLE_INTERRUPTS();
pid_t pid = m_current_thread->thread->process().pid();
@@ -253,6 +254,7 @@ namespace Kernel
remove_threads(m_sleeping_threads, it->thread->process().pid() == pid);
remove_threads(m_active_threads, it != m_current_thread && it->thread->process().pid() == pid);
delete &m_current_thread->thread->process();
delete m_current_thread->thread;
remove_and_advance_current_thread();
execute_current_thread();