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 Make RUMP_LOCKDEBUG work again.
details: https://anonhg.NetBSD.org/src/rev/d56b234a1712
branches: trunk
changeset: 787792:d56b234a1712
user: njoly <njoly%NetBSD.org@localhost>
date: Wed Jul 03 17:10:28 2013 +0000
description:
Make RUMP_LOCKDEBUG work again.
With some help from pooka@.
diffstat:
sys/rump/librump/rumpkern/locks.c | 24 ++++++++++++------------
sys/rump/librump/rumpkern/rump.c | 7 ++++---
2 files changed, 16 insertions(+), 15 deletions(-)
diffs (136 lines):
diff -r fa95678eaa7e -r d56b234a1712 sys/rump/librump/rumpkern/locks.c
--- a/sys/rump/librump/rumpkern/locks.c Wed Jul 03 15:39:22 2013 +0000
+++ b/sys/rump/librump/rumpkern/locks.c Wed Jul 03 17:10:28 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locks.c,v 1.64 2013/05/15 14:52:49 pooka Exp $ */
+/* $NetBSD: locks.c,v 1.65 2013/07/03 17:10:28 njoly Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.64 2013/05/15 14:52:49 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.65 2013/07/03 17:10:28 njoly Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -59,8 +59,8 @@
lockdebug_alloc(lock, ops, (uintptr_t)__builtin_return_address(0))
#define FREELOCK(lock) \
lockdebug_free(lock)
-#define WANTLOCK(lock, shar, try) \
- lockdebug_wantlock(lock, (uintptr_t)__builtin_return_address(0), shar, try)
+#define WANTLOCK(lock, shar) \
+ lockdebug_wantlock(lock, (uintptr_t)__builtin_return_address(0), shar)
#define LOCKED(lock, shar) \
lockdebug_locked(lock, NULL, (uintptr_t)__builtin_return_address(0), shar)
#define UNLOCKED(lock, shar) \
@@ -68,7 +68,7 @@
#else
#define ALLOCK(a, b)
#define FREELOCK(a)
-#define WANTLOCK(a, b, c)
+#define WANTLOCK(a, b)
#define LOCKED(a, b)
#define UNLOCKED(a, b)
#endif
@@ -131,7 +131,7 @@
mutex_enter(kmutex_t *mtx)
{
- WANTLOCK(mtx, false, false);
+ WANTLOCK(mtx, 0);
rumpuser_mutex_enter(RUMPMTX(mtx));
LOCKED(mtx, false);
}
@@ -140,7 +140,7 @@
mutex_spin_enter(kmutex_t *mtx)
{
- WANTLOCK(mtx, false, false);
+ WANTLOCK(mtx, 0);
rumpuser_mutex_enter_nowrap(RUMPMTX(mtx));
LOCKED(mtx, false);
}
@@ -152,7 +152,7 @@
error = rumpuser_mutex_tryenter(RUMPMTX(mtx));
if (error == 0) {
- WANTLOCK(mtx, false, true);
+ WANTLOCK(mtx, 0);
LOCKED(mtx, false);
}
return error == 0;
@@ -224,7 +224,7 @@
{
- WANTLOCK(rw, op == RW_READER, false);
+ WANTLOCK(rw, op == RW_READER);
rumpuser_rw_enter(krw2rumprw(op), RUMPRW(rw));
LOCKED(rw, op == RW_READER);
}
@@ -236,7 +236,7 @@
error = rumpuser_rw_tryenter(krw2rumprw(op), RUMPRW(rw));
if (error == 0) {
- WANTLOCK(rw, op == RW_READER, true);
+ WANTLOCK(rw, op == RW_READER);
LOCKED(rw, op == RW_READER);
}
return error == 0;
@@ -264,7 +264,7 @@
rv = rumpuser_rw_tryupgrade(RUMPRW(rw));
if (rv == 0) {
UNLOCKED(rw, 1);
- WANTLOCK(rw, 0, true);
+ WANTLOCK(rw, 0);
LOCKED(rw, 0);
}
return rv == 0;
@@ -276,7 +276,7 @@
rumpuser_rw_downgrade(RUMPRW(rw));
UNLOCKED(rw, 0);
- WANTLOCK(rw, 1, false);
+ WANTLOCK(rw, 1);
LOCKED(rw, 1);
}
diff -r fa95678eaa7e -r d56b234a1712 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Wed Jul 03 15:39:22 2013 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Wed Jul 03 17:10:28 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.270 2013/05/31 16:16:40 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.271 2013/07/03 17:10:28 njoly Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.270 2013/05/31 16:16:40 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.271 2013/07/03 17:10:28 njoly Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -282,7 +282,6 @@
aprint_verbose("%s%s", copyright, version);
rump_intr_init(numcpu);
- rump_tsleep_init();
/* init minimal lwp/cpu context */
l = &lwp0;
@@ -294,6 +293,8 @@
rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);
rumpuser_curlwpop(RUMPUSER_LWP_SET, l);
+ rump_tsleep_init();
+
rumpuser_mutex_init(&rump_giantlock, RUMPUSER_MTX_SPIN);
ksyms_init();
uvm_init();
Home |
Main Index |
Thread Index |
Old Index