aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-08-01 14:34:27 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-08-01 14:34:27 +0000
commit5cbdd18fd495da68449a5887eb83ef90961b00a7 (patch)
tree430aef71a4f8f51bb69c74df9eab7cefd05b7114
parent20abea6663c46423800256b0d29efea32d36a10f (diff)
Notes
-rw-r--r--sys/kern/kern_umtx.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index 6c914ab6f3ea..08bdd1a1a9aa 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -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);
}