Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern KASSERT we don't return back to us...
details: https://anonhg.NetBSD.org/src/rev/799643342b42
branches: trunk
changeset: 760703:799643342b42
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jan 11 10:49:20 2011 +0000
description:
KASSERT we don't return back to userspace with the kernel lock held.
diffstat:
sys/rump/librump/rumpkern/scheduler.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 8a4064122cc1 -r 799643342b42 sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c Tue Jan 11 10:48:49 2011 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c Tue Jan 11 10:49:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scheduler.c,v 1.23 2010/12/01 20:29:56 pooka Exp $ */
+/* $NetBSD: scheduler.c,v 1.24 2011/01/11 10:49:20 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.23 2010/12/01 20:29:56 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.24 2011/01/11 10:49:20 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -349,9 +349,14 @@
void
rump_unschedule()
{
- struct lwp *l;
+ struct lwp *l = rumpuser_get_curlwp();
+#ifdef DIAGNOSTIC
+ int nlock;
- l = rumpuser_get_curlwp();
+ KERNEL_UNLOCK_ALL(l, &nlock);
+ KASSERT(nlock == 0);
+#endif
+
KASSERT(l->l_mutex == l->l_cpu->ci_schedstate.spc_mutex);
rump_unschedule_cpu(l);
l->l_mutex = NULL;
Home |
Main Index |
Thread Index |
Old Index