diff options
author | attilio <attilio@FreeBSD.org> | 2010-05-11 18:24:22 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2010-05-11 18:24:22 +0000 |
commit | 4d95c325ddc0a2cee03abd4ff6cf7eaf0e75e888 (patch) | |
tree | 1ff93cd2b53115def1f3b62d662c860d7c6138af /sys/kern/kern_mutex.c | |
parent | fd4782d957bea021cedbc136b2a46eeec97e379d (diff) | |
download | FreeBSD-src-4d95c325ddc0a2cee03abd4ff6cf7eaf0e75e888.zip FreeBSD-src-4d95c325ddc0a2cee03abd4ff6cf7eaf0e75e888.tar.gz |
Right now, WITNESS just blindly pipes all the output to the
(TOCONS | TOLOG) mask even when called from DDB points.
That breaks several output, where the most notable is textdump output.
Fix this by having configurable callbacks passed to witness_list_locks()
and witness_display_spinlock() for printing out datas.
Reported by: several broken textdump outputs
Tested by: Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>
MFC after: 7 days
X-MFC: r207922
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index f9c3377..c0bef50 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -485,7 +485,7 @@ _mtx_lock_spin_failed(struct mtx *m) printf( "spin lock %p (%s) held by %p (tid %d) too long\n", m, m->lock_object.lo_name, td, td->td_tid); #ifdef WITNESS - witness_display_spinlock(&m->lock_object, td); + witness_display_spinlock(&m->lock_object, td, printf); #endif panic("spin lock held too long"); } |