Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jan 2016 01:21:11 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r294614 - stable/10/sys/kern
Message-ID:  <201601230121.u0N1LBNX097492@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Sat Jan 23 01:21:11 2016
New Revision: 294614
URL: https://svnweb.freebsd.org/changeset/base/294614

Log:
  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.

Modified:
  stable/10/sys/kern/kern_thread.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_thread.c
==============================================================================
--- stable/10/sys/kern/kern_thread.c	Sat Jan 23 01:20:58 2016	(r294613)
+++ stable/10/sys/kern/kern_thread.c	Sat Jan 23 01:21:11 2016	(r294614)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601230121.u0N1LBNX097492>