Module Name: src
Committed By: pooka
Date: Tue Nov 2 15:17:38 UTC 2010
Modified Files:
src/sys/kern: kern_synch.c
Log Message:
KASSERT we don't kpause indefinitely without interruptability.
XXX: using timo == 0 to mean "sleep as long as you like, and forever
if you're really tired" is not the smartest interface considering
the the hz/n idiom used to specify timo. This leads to unwanted
behaviour when hz gets below some impossible-to-know limit. With
a usec2ticks() routine it at least be a little more tolerable.
To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/sys/kern/kern_synch.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_synch.c
diff -u src/sys/kern/kern_synch.c:1.283 src/sys/kern/kern_synch.c:1.284
--- src/sys/kern/kern_synch.c:1.283 Fri Apr 30 10:02:00 2010
+++ src/sys/kern/kern_synch.c Tue Nov 2 15:17:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_synch.c,v 1.283 2010/04/30 10:02:00 martin Exp $ */
+/* $NetBSD: kern_synch.c,v 1.284 2010/11/02 15:17:37 pooka Exp $ */
/*-
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.283 2010/04/30 10:02:00 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.284 2010/11/02 15:17:37 pooka Exp $");
#include "opt_kstack.h"
#include "opt_perfctrs.h"
@@ -256,6 +256,8 @@
sleepq_t *sq;
int error;
+ KASSERT(!(timo == 0 && intr == false));
+
if (sleepq_dontsleep(l))
return sleepq_abort(NULL, 0);