diff options
author | kib <kib@FreeBSD.org> | 2016-08-27 11:45:05 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-08-27 11:45:05 +0000 |
commit | 2a3105a7da242c365148bc29a1c2dbc970470695 (patch) | |
tree | 2b639840f1ecfd194b87803f61883eb34df37015 /sys/kern/kern_thread.c | |
parent | f633fa427aea80172a76a9e1729795495c17c94a (diff) | |
download | FreeBSD-src-2a3105a7da242c365148bc29a1c2dbc970470695.zip FreeBSD-src-2a3105a7da242c365148bc29a1c2dbc970470695.tar.gz |
MFC r303426:
Rewrite subr_sleepqueue.c use of callouts to not depend on the
specifics of callout KPI.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 2f8382c..7b04d96 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -319,7 +319,7 @@ thread_reap(void) /* * Don't even bother to lock if none at this instant, - * we really don't care about the next instant.. + * we really don't care about the next instant. */ if (!TAILQ_EMPTY(&zombie_threads)) { mtx_lock_spin(&zombie_lock); @@ -383,6 +383,7 @@ thread_free(struct thread *td) cpu_thread_free(td); if (td->td_kstack != 0) vm_thread_dispose(td); + callout_drain(&td->td_slpcallout); uma_zfree(thread_zone, td); } @@ -524,6 +525,7 @@ thread_wait(struct proc *p) td->td_cpuset = NULL; cpu_thread_clean(td); crfree(td->td_ucred); + callout_drain(&td->td_slpcallout); thread_reap(); /* check for zombie threads etc. */ } |