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_mutex.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_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index e36f65c..523d911 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -177,7 +177,7 @@ _mtx_lock_flags(struct mtx *m, int opts, const char *file, int line) ("mtx_lock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, - file, line); + file, line, NULL); _get_sleep_lock(m, curthread, opts, file, line); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, @@ -221,7 +221,7 @@ _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line) ("mtx_lock_spin: recursed on non-recursive mutex %s @ %s:%d\n", m->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, - file, line); + file, line, NULL); _get_spin_lock(m, curthread, opts, file, line); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); @@ -506,7 +506,7 @@ retry: ("thread_lock: recursed on non-recursive mutex %s @ %s:%d\n", m->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&m->lock_object, - opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line); + opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); while (!_obtain_lock(m, tid)) { if (m->mtx_lock == tid) { m->mtx_recurse++; |