From 0057ac8761c871758f3396e216b1509bba4a358c Mon Sep 17 00:00:00 2001 From: mjg Date: Sat, 25 Nov 2017 20:37:13 +0000 Subject: [PATCH] Convert in-kernel thread_lock_flags calls to thread_lock when debug is disabled The flags argument is not used in this case. --- sys/sys/mutex.h | 6 ++++++ 1 file changed, 6 insertions(+) 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)