Date: Tue, 29 Dec 2015 23:16:20 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292892 - head/sys/kern Message-ID: <201512292316.tBTNGKhM019663@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Dec 29 23:16:20 2015 New Revision: 292892 URL: https://svnweb.freebsd.org/changeset/base/292892 Log: Call kern_thr_exit() instead of duplicating it. This code is missing the racct_subr() call from kern_thr_exit() and would require further code duplication in future changes. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Dec 29 22:18:35 2015 (r292891) +++ head/sys/kern/kern_thread.c Tue Dec 29 23:16:20 2015 (r292892) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include <sys/sched.h> #include <sys/sleepqueue.h> #include <sys/selinfo.h> +#include <sys/syscallsubr.h> #include <sys/sysent.h> #include <sys/turnstile.h> #include <sys/ktr.h> @@ -942,7 +943,6 @@ thread_suspend_check(int return_instead) */ if ((p->p_flag & P_SINGLE_EXIT) && (p->p_singlethread != td)) { PROC_UNLOCK(p); - tidhash_remove(td); /* * Allow Linux emulation layer to do some work @@ -950,13 +950,8 @@ thread_suspend_check(int return_instead) */ if (__predict_false(p->p_sysent->sv_thread_detach != NULL)) (p->p_sysent->sv_thread_detach)(td); - - PROC_LOCK(p); - tdsigcleanup(td); - umtx_thread_exit(td); - PROC_SLOCK(p); - thread_stopped(p); - thread_exit(); + kern_thr_exit(td); + panic("stopped thread did not exit"); } PROC_SLOCK(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512292316.tBTNGKhM019663>