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
This commit is contained in:
parent
a09b08770e
commit
79ec12eeb6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user