Module Name: src
Committed By: pooka
Date: Fri Oct 2 09:56:08 UTC 2009
Modified Files:
src/sys/rump/librump/rumpkern: locks.c
Log Message:
panic if cv_wait() is called in non-threaded mode
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/locks.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/rump/librump/rumpkern/locks.c
diff -u src/sys/rump/librump/rumpkern/locks.c:1.27 src/sys/rump/librump/rumpkern/locks.c:1.28
--- src/sys/rump/librump/rumpkern/locks.c:1.27 Sat Feb 7 01:50:29 2009
+++ src/sys/rump/librump/rumpkern/locks.c Fri Oct 2 09:56:08 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: locks.c,v 1.27 2009/02/07 01:50:29 pooka Exp $ */
+/* $NetBSD: locks.c,v 1.28 2009/10/02 09:56:08 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.27 2009/02/07 01:50:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.28 2009/10/02 09:56:08 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -235,6 +235,8 @@
cv_wait(kcondvar_t *cv, kmutex_t *mtx)
{
+ if (rump_threads == 0)
+ panic("cv_wait without threads");
rumpuser_cv_wait(RUMPCV(cv), RUMPMTX(mtx));
}