aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-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();