summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-03-24 19:21:26 +0000
committerbz <bz@FreeBSD.org>2010-03-24 19:21:26 +0000
commit8fb79807f29b026c1c60ed7e06c3b6f43f5bd3ba (patch)
tree4094d200f4d0e57046d124c6e591cc10454c5078 /sys/kern
parent06f6daa62886228ac9dfb295555ed852f7160685 (diff)
downloadFreeBSD-src-8fb79807f29b026c1c60ed7e06c3b6f43f5bd3ba.zip
FreeBSD-src-8fb79807f29b026c1c60ed7e06c3b6f43f5bd3ba.tar.gz
Print the pointer to the lock with the panic message. The previous
panic: rw lock not unlocked was not really helpful for debugging. Now one can at least call show lock <ptr> form ddb to learn more about the lock. MFC after: 3 days
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_rwlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index c1f13e0..81b4c5f 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -199,8 +199,8 @@ void
rw_destroy(struct rwlock *rw)
{
- KASSERT(rw->rw_lock == RW_UNLOCKED, ("rw lock not unlocked"));
- KASSERT(rw->rw_recurse == 0, ("rw lock still recursed"));
+ KASSERT(rw->rw_lock == RW_UNLOCKED, ("rw lock %p not unlocked", rw));
+ KASSERT(rw->rw_recurse == 0, ("rw lock %p still recursed", rw));
rw->rw_lock = RW_DESTROYED;
lock_destroy(&rw->lock_object);
}
OpenPOWER on IntegriCloud