Implement lock IRQ nesting via stack variables/contexts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 21s

This commit is contained in:
2026-01-14 22:11:56 +01:00
parent 55166f9d5f
commit 270ff507d4
22 changed files with 197 additions and 145 deletions

View File

@@ -74,11 +74,12 @@ struct proc* proc_from_elf (uint8_t* elf_contents) {
void proc_cleanup (struct proc* proc) {
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
spin_lock_ctx_t ctxprpd;
proc_cleanup_resources (proc);
struct list_node_link *mapping_link, *mapping_link_tmp;
spin_lock (&proc->pd.lock);
spin_lock (&proc->pd.lock, &ctxprpd);
list_foreach (proc->mappings, mapping_link, mapping_link_tmp) {
struct proc_mapping* mapping =
@@ -88,7 +89,7 @@ void proc_cleanup (struct proc* proc) {
free (mapping);
}
spin_unlock (&proc->pd.lock);
spin_unlock (&proc->pd.lock, &ctxprpd);
pmm_free (proc->pd.cr3_paddr, 1);