Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Allow sleeping in the idle lwp if the cpu isn't run...



details:   https://anonhg.NetBSD.org/src/rev/369e17a68c83
branches:  trunk
changeset: 337327:369e17a68c83
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Apr 11 15:23:56 2015 +0000

description:
Allow sleeping in the idle lwp if the cpu isn't running yet.

OK'ed by rmind a while ago.

diffstat:

 sys/kern/kern_lock.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r dc1411713945 -r 369e17a68c83 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Sat Apr 11 15:21:33 2015 +0000
+++ b/sys/kern/kern_lock.c      Sat Apr 11 15:23:56 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.155 2013/09/14 20:24:22 martin Exp $   */
+/*     $NetBSD: kern_lock.c,v 1.156 2015/04/11 15:23:56 skrll Exp $    */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.155 2013/09/14 20:24:22 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.156 2015/04/11 15:23:56 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -78,7 +78,8 @@
        } while (pctr != lwp_pctr());
 
        reason = NULL;
-       if (idle && !cold) {
+       if (idle && !cold &&
+           kcpuset_isset(kcpuset_running, cpu_index(curcpu()))) {
                reason = "idle";
        }
        if (cpu_intr_p()) {



Home | Main Index | Thread Index | Old Index