summaryrefslogtreecommitdiffstats
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-07-31 18:50:58 +0000
committerjhb <jhb@FreeBSD.org>2003-07-31 18:50:58 +0000
commita3b9c0d55345861352cfe71080a09693ff39682f (patch)
tree9af0a80a9c1231f3bf512b69e06a13cb6affaa6d /sys/sys/lock.h
parentcc461cb6e3210c65f97f97566f6d0cf18b98f870 (diff)
downloadFreeBSD-src-a3b9c0d55345861352cfe71080a09693ff39682f.zip
FreeBSD-src-a3b9c0d55345861352cfe71080a09693ff39682f.tar.gz
Add a new function to look for a spinlock's instance when it is held by
another thread. We use the td_oncpu member of the other field to locate it's associated CPU and then search the that CPU's list of spin locks contained in its per-CPU data. This is not always safe and may in fact panic or just not work, but it is useful in at least one case.
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 106018b..dcf7b77 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -206,6 +206,7 @@ void witness_restore(struct lock_object *, const char *, int);
int witness_list_locks(struct lock_list_entry **);
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 *);
int witness_line(struct lock_object *);
const char *witness_file(struct lock_object *);
OpenPOWER on IntegriCloud