diff options
author | jhb <jhb@FreeBSD.org> | 2008-09-10 19:13:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-09-10 19:13:30 +0000 |
commit | af0471aaecf118efcab5180cdca70a1151722ae3 (patch) | |
tree | 5defb101ad58952942e4cc44e94404cf65868d19 /sys/kern/kern_lock.c | |
parent | bc107b3828d742160ad1da66c6e2577731499014 (diff) | |
download | FreeBSD-src-af0471aaecf118efcab5180cdca70a1151722ae3.zip FreeBSD-src-af0471aaecf118efcab5180cdca70a1151722ae3.tar.gz |
Teach WITNESS about the interlocks used with lockmgr. This removes a bunch
of spurious witness warnings since lockmgr grew witness support. Before
this, every time you passed an interlock to a lockmgr lock WITNESS treated
it as a LOR.
Reviewed by: attilio
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index df123a5..2bb02fd 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -375,7 +375,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, case LK_SHARED: if (LK_CAN_WITNESS(flags)) WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER, - file, line); + file, line, ilk); for (;;) { x = lk->lk_lock; @@ -505,7 +505,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, case LK_EXCLUSIVE: if (LK_CAN_WITNESS(flags)) WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER | - LOP_EXCLUSIVE, file, line); + LOP_EXCLUSIVE, file, line, ilk); /* * If curthread already holds the lock and this one is @@ -724,7 +724,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, case LK_DRAIN: if (LK_CAN_WITNESS(flags)) WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER | - LOP_EXCLUSIVE, file, line); + LOP_EXCLUSIVE, file, line, ilk); /* * Trying to drain a lock we already own will result in a |