summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2005-10-09 04:30:31 +0000
committerXin LI <delphij@FreeBSD.org>2005-10-09 04:30:31 +0000
commit7cc8689679ff41f1aa7bd7cec5d0788e6e7e25e1 (patch)
tree906eb2e531129eebf9a3c35c8c377f1aaa4376c6
parent5278b7359edf032aba275ec0496f64e7496bc36c (diff)
downloadsrc-test2-7cc8689679ff41f1aa7bd7cec5d0788e6e7e25e1.tar.gz
src-test2-7cc8689679ff41f1aa7bd7cec5d0788e6e7e25e1.zip
Notes
-rw-r--r--sys/kern/kern_mutex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index c659fedf21c1..a0127e77d165 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -407,6 +407,9 @@ _mtx_trylock(struct mtx *m, int opts, const char *file, int line)
int rval;
MPASS(curthread != NULL);
+ KASSERT(m->mtx_object.lo_class == &lock_class_mtx_sleep,
+ ("mtx_trylock() of spin mutex %s @ %s:%d", m->mtx_object.lo_name,
+ file, line));
if (mtx_owned(m) && (m->mtx_object.lo_flags & LO_RECURSABLE) != 0) {
m->mtx_recurse++;
@@ -594,7 +597,7 @@ _mtx_lock_spin(struct mtx *m, uintptr_t tid, int opts, const char *file,
}
if (i < 60000000)
DELAY(1);
- else if (!kdb_active) {
+ else if (!kdb_active && !panicstr) {
printf("spin lock %s held by %p for > 5 seconds\n",
m->mtx_object.lo_name, (void *)m->mtx_lock);
#ifdef WITNESS