Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern lwp_wait(): don't need to check for process exit, c...



details:   https://anonhg.NetBSD.org/src/rev/00e84d684401
branches:  trunk
changeset: 931013:00e84d684401
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Apr 19 23:05:04 2020 +0000

description:
lwp_wait(): don't need to check for process exit, cv_wait_sig() does it.

diffstat:

 sys/kern/kern_lwp.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (36 lines):

diff -r d8150c2442f3 -r 00e84d684401 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Sun Apr 19 22:10:24 2020 +0000
+++ b/sys/kern/kern_lwp.c       Sun Apr 19 23:05:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.233 2020/04/04 20:20:12 thorpej Exp $   */
+/*     $NetBSD: kern_lwp.c,v 1.234 2020/04/19 23:05:04 ad Exp $        */
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020
@@ -211,7 +211,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.233 2020/04/04 20:20:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.234 2020/04/19 23:05:04 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -740,13 +740,11 @@
                }
 
                /*
-                * Break out if the process is exiting, or if all LWPs are
-                * in _lwp_wait().  There are other ways to hang the process
-                * with _lwp_wait(), but the sleep is interruptable so
-                * little point checking for them.
+                * Break out if all LWPs are in _lwp_wait().  There are
+                * other ways to hang the process with _lwp_wait(), but the
+                * sleep is interruptable so little point checking for them.
                 */
-               if ((p->p_sflag & PS_WEXIT) != 0 ||
-                   p->p_nlwpwait == p->p_nlwps) {
+               if (p->p_nlwpwait == p->p_nlwps) {
                        error = EDEADLK;
                        break;
                }



Home | Main Index | Thread Index | Old Index