summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-01-23 01:21:11 +0000
committerjhb <jhb@FreeBSD.org>2016-01-23 01:21:11 +0000
commit51a396136ecde08b5b9e4fbf449c3b167483ee0c (patch)
treeec6e7d1c810f091e71a0255bb26302d1cd341794
parent27f8f705dc0192ad9213cd60a5775d597a07f31c (diff)
downloadFreeBSD-src-51a396136ecde08b5b9e4fbf449c3b167483ee0c.zip
FreeBSD-src-51a396136ecde08b5b9e4fbf449c3b167483ee0c.tar.gz
MFC 292892:
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.
-rw-r--r--sys/kern/kern_thread.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 96f68609ca..c85813b 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -46,6 +46,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>
@@ -885,7 +886,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
@@ -893,13 +893,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);
OpenPOWER on IntegriCloud