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 Mark cv_wait mutex as locked befor...
details: https://anonhg.NetBSD.org/src/rev/3a36953ab666
branches: trunk
changeset: 763065:3a36953ab666
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Mar 09 18:15:39 2011 +0000
description:
Mark cv_wait mutex as locked before doing any further dances.
Fixes a LOCKDEBUG panic in case the uncommon condition is hit.
diffstat:
sys/rump/librump/rumpkern/locks.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 11db58972bb4 -r 3a36953ab666 sys/rump/librump/rumpkern/locks.c
--- a/sys/rump/librump/rumpkern/locks.c Wed Mar 09 18:12:04 2011 +0000
+++ b/sys/rump/librump/rumpkern/locks.c Wed Mar 09 18:15:39 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locks.c,v 1.51 2011/03/08 12:39:29 pooka Exp $ */
+/* $NetBSD: locks.c,v 1.52 2011/03/09 18:15:39 pooka Exp $ */
/*
* Copyright (c) 2007, 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.51 2011/03/08 12:39:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.52 2011/03/09 18:15:39 pooka Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -305,6 +305,8 @@
rumpuser_cv_wait(RUMPCV(cv), RUMPMTX(mtx));
}
+ LOCKED(mtx, false);
+
/*
* Check for QEXIT. if so, we need to wait here until we
* are allowed to exit.
@@ -330,8 +332,6 @@
}
l->l_private = NULL;
- LOCKED(mtx, false);
-
return rv;
}
Home |
Main Index |
Thread Index |
Old Index