summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-02-16 10:39:49 +0000
committerjeff <jeff@FreeBSD.org>2003-02-16 10:39:49 +0000
commitbdd105307471f46e2cca3dd3a5c2ee859c6863ac (patch)
treef6ee64dce9d004e90add5a9e9588f86ac1b2abae /sys
parente112efd22cc7f9324ea47e8051fd129123c86ae0 (diff)
downloadFreeBSD-src-bdd105307471f46e2cca3dd3a5c2ee859c6863ac.zip
FreeBSD-src-bdd105307471f46e2cca3dd3a5c2ee859c6863ac.tar.gz
- Add a WITNESS_SLEEP() for the appropriate cases in lockmgr().
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_lock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 9d2013f..aaf09aa 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -232,6 +232,13 @@ debuglockmgr(lkp, flags, interlkp, td, name, file, line)
else
thr = td;
+ if ((flags & (LK_NOWAIT|LK_RELEASE)) == 0) {
+ if ((flags & LK_INTERLOCK) == 0)
+ WITNESS_SLEEP(1, NULL);
+ else
+ WITNESS_SLEEP(1, &interlkp->mtx_object);
+ }
+
mtx_lock(lkp->lk_interlock);
if (flags & LK_INTERLOCK) {
mtx_assert(interlkp, MA_OWNED | MA_NOTRECURSED);
OpenPOWER on IntegriCloud