summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-21 21:45:39 -0400
committerIan Moffett <ian@osmora.org>2024-04-21 21:45:39 -0400
commitdd375201a9fd44d1a58f5946dc83018afa240dec (patch)
treea5ac0e34ef38fba6740dfa4f8956821a78e262c1 /sys/kern
parent6318eaf21fd2fceaae6101a7e015157b226c690c (diff)
kernel: sched: Ensure td is removed from queue
Upon sched_exit(), the thread should not be in the queue Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sched.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c
index 1d9ba11..9551265 100644
--- a/sys/kern/kern_sched.c
+++ b/sys/kern/kern_sched.c
@@ -358,6 +358,7 @@ sched_exit(void)
/* Switch back to the kernel address space and destroy ourself */
pmap_switch_vas(vm_get_ctx(), kvas);
+ TAILQ_REMOVE(&td_queue, td, link);
sched_destroy_td(td);
intr_unmask();