aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_mutex.c4
-rw-r--r--sys/kern/kern_rwlock.c4
-rw-r--r--sys/kern/kern_sx.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 23b731b77880..a6847d0fb207 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -275,7 +275,11 @@ __mtx_unlock_flags(volatile uintptr_t *c, int opts, const char *file, int line)
line);
mtx_assert(m, MA_OWNED);
+#ifdef LOCK_PROFILING
__mtx_unlock_sleep(c, opts, file, line);
+#else
+ __mtx_unlock(m, curthread, opts, file, line);
+#endif
TD_LOCKS_DEC(curthread);
}
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index fcb7d00c3d68..bf74b6710499 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -341,7 +341,11 @@ _rw_wunlock_cookie(volatile uintptr_t *c, const char *file, int line)
LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file,
line);
+#ifdef LOCK_PROFILING
_rw_wunlock_hard(rw, (uintptr_t)curthread, file, line);
+#else
+ __rw_wunlock(rw, curthread, file, line);
+#endif
TD_LOCKS_DEC(curthread);
}
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 7162a1aa243e..b09a5cad6534 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -364,7 +364,11 @@ _sx_xunlock(struct sx *sx, const char *file, int line)
WITNESS_UNLOCK(&sx->lock_object, LOP_EXCLUSIVE, file, line);
LOCK_LOG_LOCK("XUNLOCK", &sx->lock_object, 0, sx->sx_recurse, file,
line);
+#ifdef LOCK_PROFILING
_sx_xunlock_hard(sx, (uintptr_t)curthread, file, line);
+#else
+ __sx_xunlock(sx, curthread, file, line);
+#endif
TD_LOCKS_DEC(curthread);
}