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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"

Reply via email to