aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2010-05-11 18:24:22 +0000
committerAttilio Rao <attilio@FreeBSD.org>2010-05-11 18:24:22 +0000
commit98332c8c71261881b54b8ee53437ecba6f86ae8d (patch)
tree1ff93cd2b53115def1f3b62d662c860d7c6138af /sys/sys/lock.h
parent227901e1a2b93ee9712e1b72bdc7dde49dec1e51 (diff)
downloadsrc-98332c8c71261881b54b8ee53437ecba6f86ae8d.tar.gz
src-98332c8c71261881b54b8ee53437ecba6f86ae8d.zip
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
Notes
Notes: svn path=/head/; revision=207929
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 066f4d4891b5..85d8bb824cd5 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -212,10 +212,12 @@ void witness_downgrade(struct lock_object *, int, const char *, int);
void witness_unlock(struct lock_object *, int, const char *, int);
void witness_save(struct lock_object *, const char **, int *);
void witness_restore(struct lock_object *, const char *, int);
-int witness_list_locks(struct lock_list_entry **);
+int witness_list_locks(struct lock_list_entry **,
+ int (*)(const char *, ...));
int witness_warn(int, struct lock_object *, const char *, ...);
void witness_assert(struct lock_object *, int, const char *, int);
-void witness_display_spinlock(struct lock_object *, struct thread *);
+void witness_display_spinlock(struct lock_object *, struct thread *,
+ int (*)(const char *, ...));
int witness_line(struct lock_object *);
void witness_norelease(struct lock_object *);
void witness_releaseok(struct lock_object *);