svn commit: r351790 - stable/12/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Tue Sep 3 20:06:37 UTC 2019
Author: kib
Date: Tue Sep 3 20:06:36 2019
New Revision: 351790
URL: https://svnweb.freebsd.org/changeset/base/351790
Log:
MFC r350502:
Make umtxq_check_susp() to correctly handle thread exit requests.
Modified:
stable/12/sys/kern/kern_umtx.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/kern/kern_umtx.c
==============================================================================
--- stable/12/sys/kern/kern_umtx.c Tue Sep 3 20:04:44 2019 (r351789)
+++ stable/12/sys/kern/kern_umtx.c Tue Sep 3 20:06:36 2019 (r351790)
@@ -723,13 +723,11 @@ umtxq_check_susp(struct thread *td, bool sleep)
error = 0;
p = td->td_proc;
PROC_LOCK(p);
- if (P_SHOULDSTOP(p) ||
- ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_SUSPEND))) {
- if (p->p_flag & P_SINGLE_EXIT)
- error = EINTR;
- else
- error = sleep ? thread_suspend_check(0) : ERESTART;
- }
+ if (p->p_flag & P_SINGLE_EXIT)
+ error = EINTR;
+ else if (P_SHOULDSTOP(p) ||
+ ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_SUSPEND)))
+ error = sleep ? thread_suspend_check(0) : ERESTART;
PROC_UNLOCK(p);
return (error);
}
More information about the svn-src-all
mailing list