diff options
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index c0b929a..32b43b8 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. */ |