aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mutex.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2017-11-25 20:37:13 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2017-11-25 20:37:13 +0000
commit11183f42d923284876ab2ada62b8e0cd905e3608 (patch)
tree7c8f2a43e3a6fad06dc6b43f733b2b8cb0972e14 /sys/sys/mutex.h
parent5ba6facfcdc458db47b8722824aa1828cd2059ba (diff)
downloadsrc-11183f42d923284876ab2ada62b8e0cd905e3608.tar.gz
src-11183f42d923284876ab2ada62b8e0cd905e3608.zip
Convert in-kernel thread_lock_flags calls to thread_lock when debug is disabled
The flags argument is not used in this case.
Notes
Notes: svn path=/head/; revision=326199
Diffstat (limited to 'sys/sys/mutex.h')
-rw-r--r--sys/sys/mutex.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index a5a5b32fde6d..5e19407f85ca 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -145,8 +145,14 @@ void _thread_lock(struct thread *);
_thread_lock((tdp))
#endif
+#if LOCK_DEBUG > 0
#define thread_lock_flags(tdp, opt) \
thread_lock_flags_((tdp), (opt), __FILE__, __LINE__)
+#else
+#define thread_lock_flags(tdp, opt) \
+ _thread_lock(tdp)
+#endif
+
#define thread_unlock(tdp) \
mtx_unlock_spin((tdp)->td_lock)