diff options
author | Renato Botelho <renato@netgate.com> | 2016-08-17 15:23:38 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-08-17 15:23:38 -0300 |
commit | 75cd8d40056c799f03b759475d9bfd10ba266a6c (patch) | |
tree | 60433235501684bffeab90e65139a8285fcf46a9 /sys/kern/kern_kthread.c | |
parent | 99990a0d149f0eae805aa1f49d4a61be30c3b000 (diff) | |
parent | ad413762f28e3be343987e707b9cf4f10f963693 (diff) | |
download | FreeBSD-src-75cd8d40056c799f03b759475d9bfd10ba266a6c.zip FreeBSD-src-75cd8d40056c799f03b759475d9bfd10ba266a6c.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r-- | sys/kern/kern_kthread.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 70d95fa..fb46025 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -322,11 +322,13 @@ void kthread_exit(void) { struct proc *p; + struct thread *td; - p = curthread->td_proc; + td = curthread; + p = td->td_proc; /* A module may be waiting for us to exit. */ - wakeup(curthread); + wakeup(td); /* * The last exiting thread in a kernel process must tear down @@ -339,9 +341,10 @@ kthread_exit(void) rw_wunlock(&tidhash_lock); kproc_exit(0); } - LIST_REMOVE(curthread, td_hash); + LIST_REMOVE(td, td_hash); rw_wunlock(&tidhash_lock); - umtx_thread_exit(curthread); + umtx_thread_exit(td); + tdsigcleanup(td); PROC_SLOCK(p); thread_exit(); } |