summaryrefslogtreecommitdiff
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>2006-10-02 02:06:27 +0000
committerTor Egge <tegge@FreeBSD.org>2006-10-02 02:06:27 +0000
commit04aa807cb6d18828a8121143063cc9ec2120bd79 (patch)
treee5d5e1e8f49a36219f541a75afc21293e49757cd /sys/kern/kern_lock.c
parent2eb6639bf4664e6b8f8292c1da939638e32894e4 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index c0b929ab87906..32b43b863b2d7 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -566,6 +566,21 @@ lockcount(lkp)
}
/*
+ * Determine the number of waiters on a lock.
+ */
+int
+lockwaiters(lkp)
+ struct lock *lkp;
+{
+ int count;
+
+ mtx_lock(lkp->lk_interlock);
+ count = lkp->lk_waitcount;
+ mtx_unlock(lkp->lk_interlock);
+ return (count);
+}
+
+/*
* Print out information about state of a lock. Used by VOP_PRINT
* routines to display status about contained locks.
*/