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:
ae 2015-07-26 10:53:32 +00:00
parent f6d397ca56
commit bac84ac2ac

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)