Remove spinlock contexts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 28s

This commit is contained in:
2026-02-08 18:58:53 +01:00
parent 1ca3d11bac
commit 9e6035bd68
26 changed files with 161 additions and 262 deletions

View File

@@ -61,7 +61,6 @@ struct proc* proc_from_elf (uint8_t* elf_contents) {
struct proc* proc_clone (struct proc* proto, uintptr_t vstack_top, uintptr_t entry,
uintptr_t argument_ptr) {
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
spin_lock_ctx_t ctxprt;
struct proc* proc = malloc (sizeof (*proc));
if (proc == NULL)
@@ -73,12 +72,12 @@ struct proc* proc_clone (struct proc* proto, uintptr_t vstack_top, uintptr_t ent
atomic_store (&proc->state, PROC_READY);
proc->pid = atomic_fetch_add (&pids, 1);
spin_lock (&proto->lock, &ctxprt);
spin_lock (&proto->lock);
proc->procgroup = proto->procgroup;
procgroup_attach (proc->procgroup, proc);
spin_unlock (&proto->lock, &ctxprt);
spin_unlock (&proto->lock);
uintptr_t kstack_paddr = pmm_alloc (KSTACK_SIZE / PAGE_SIZE);
proc->pdata.kernel_stack = kstack_paddr + (uintptr_t)hhdm->offset + KSTACK_SIZE;