diff options
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 97e1985..bec8f6b 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -224,7 +224,7 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line) line); WITNESS_LOCK(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_EXCLUSIVE, file, line); - curthread->td_locks++; + TD_LOCKS_INC(curthread); } void @@ -248,7 +248,7 @@ __mtx_unlock_flags(volatile uintptr_t *c, int opts, const char *file, int line) mtx_assert(m, MA_OWNED); __mtx_unlock(m, curthread, opts, file, line); - curthread->td_locks--; + TD_LOCKS_DEC(curthread); } void @@ -347,7 +347,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line) if (rval) { WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE | LOP_TRYLOCK, file, line); - curthread->td_locks++; + TD_LOCKS_INC(curthread); if (m->mtx_recurse == 0) LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, m, contested, waittime, file, line); @@ -958,7 +958,7 @@ _mtx_destroy(volatile uintptr_t *c) if (LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin) spinlock_exit(); else - curthread->td_locks--; + TD_LOCKS_DEC(curthread); lock_profile_release_lock(&m->lock_object); /* Tell witness this isn't locked to make it happy. */ |