svn commit: r292892 - head/sys/kern
John Baldwin
jhb at FreeBSD.org
Tue Dec 29 23:16:21 UTC 2015
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);
More information about the svn-src-head
mailing list