From 41f5f69f965f3f2affc5ad79d2598a355340fe45 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Sun, 26 Jul 2015 10:53:32 +0000 Subject: [PATCH] Build debug version of rmlock's methods only when LOCK_DEBUG > 0. Currently LOCK_DEBUG is always defined in sys/lock.h (0 or 1). This means that debugging code always built. In addition the kernel modules have always defined LOCK_DEBUG as 1. So, debugging rmlock code is always used by kernel modules. MFC after: 1 week --- sys/kern/kern_rmlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index b5ea2aff05ce..945608da2834 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -586,7 +586,7 @@ _rm_wunlock(struct rmlock *rm) mtx_unlock(&rm->rm_lock_mtx); } -#ifdef LOCK_DEBUG +#if LOCK_DEBUG > 0 void _rm_wlock_debug(struct rmlock *rm, const char *file, int line)