summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sched.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-26 16:38:41 -0400
committerIan Moffett <ian@osmora.org>2024-04-26 16:42:51 -0400
commit6a6717b1e4f3f85a09fa48ee11e5421771995493 (patch)
treedfd891a4633bf03b14b296fd22f70c7f16485286 /sys/kern/kern_sched.c
parentf5b5210cd6c6f62f012c9fd894f5e2a2bb328cb0 (diff)
kernel: Implement basic loader_unload()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r--sys/kern/kern_sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c
index 1f302d9..1b4c987 100644
--- a/sys/kern/kern_sched.c
+++ b/sys/kern/kern_sched.c
@@ -308,6 +308,7 @@ static void
sched_destroy_td(struct proc *td)
{
const struct vm_range *stack_range = &td->addr_range[ADDR_RANGE_STACK];
+ struct vm_range *exec_range = &td->addr_range[ADDR_RANGE_EXEC];
vm_mapq_t *mapq;
processor_free_pcb(td);
@@ -334,6 +335,7 @@ sched_destroy_td(struct proc *td)
vm_free_mapq(mapq);
}
+ loader_unload(td->addrsp, exec_range);
pmap_free_vas(vm_get_ctx(), td->addrsp);
dynfree(td);
}