Unlock mutexes on process death

This commit is contained in:
2026-01-29 01:38:44 +01:00
parent 388418a718
commit fdda2e2df8
4 changed files with 39 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
#include <limine/requests.h>
#include <mm/liballoc.h>
#include <mm/pmm.h>
#include <proc/mutex.h>
#include <proc/proc.h>
#include <proc/procgroup.h>
#include <proc/resource.h>
@@ -118,6 +119,8 @@ void proc_cleanup (struct proc* proc) {
spin_unlock (&proc->lock, &ctxpr);
proc_mutexes_cleanup (proc);
pmm_free (proc->pdata.kernel_stack, KSTACK_SIZE / PAGE_SIZE);
procgroup_unmap (proc->procgroup, proc->pdata.tls_vaddr, proc->procgroup->tls.tls_tmpl_pages);