diff options
author | julian <julian@FreeBSD.org> | 2004-04-02 01:01:34 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-04-02 01:01:34 +0000 |
commit | 89d6572b1f58c9e6c3e2daf1002d2d1d47412211 (patch) | |
tree | e9db6fdec6d82f79a24c85ecb4a5bb4a0d15043e /sys/kern/kern_thr.c | |
parent | 3e726bfc8b9cc9d3dfede359e80efd879052362c (diff) | |
download | FreeBSD-src-89d6572b1f58c9e6c3e2daf1002d2d1d47412211.zip FreeBSD-src-89d6572b1f58c9e6c3e2daf1002d2d1d47412211.tar.gz |
The comment complained about not having a thread_unlink()
and did the work itself, but thread_unink() has existed for a while... use it.
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r-- | sys/kern/kern_thr.c | 7 |
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; |