summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 24aaaac..e4f3c05 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -81,11 +81,8 @@ thr_exit1(void)
/* Clean up cpu resources. */
cpu_thread_exit(td);
- /* XXX make thread_unlink() */
- TAILQ_REMOVE(&p->p_threads, td, td_plist);
- p->p_numthreads--;
- TAILQ_REMOVE(&kg->kg_threads, td, td_kglist);
- kg->kg_numthreads--;
+ /* Unlink the thread from the process and kseg.
+ thread_unlink(td);
ke->ke_state = KES_UNQUEUED;
ke->ke_thread = NULL;
OpenPOWER on IntegriCloud