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
This commit is contained in:
Andrey V. Elsukov 2015-07-26 10:53:32 +00:00
parent cf9e47b2f0
commit 41f5f69f96

View File

@ -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)