Module Name: src
Committed By: snj
Date: Tue Jan 5 22:16:44 UTC 2016
Modified Files:
src/sys/kern [netbsd-7]: kern_lock.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #1056):
sys/kern/kern_lock.c: revision 1.156
Allow sleeping in the idle lwp if the cpu isn't running yet.
OK'ed by rmind a while ago.
To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.155.4.1 src/sys/kern/kern_lock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_lock.c
diff -u src/sys/kern/kern_lock.c:1.155 src/sys/kern/kern_lock.c:1.155.4.1
--- src/sys/kern/kern_lock.c:1.155 Sat Sep 14 20:24:22 2013
+++ src/sys/kern/kern_lock.c Tue Jan 5 22:16:44 2016
@@ -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.155.4.1 2016/01/05 22:16:44 snj 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.155.4.1 2016/01/05 22:16:44 snj Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -78,7 +78,8 @@ assert_sleepable(void)
} 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()) {