Author: ae
Date: Sun Jul 26 10:53:32 2015
New Revision: 285888
URL: https://svnweb.freebsd.org/changeset/base/285888

Log:
  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

Modified:
  head/sys/kern/kern_rmlock.c

Modified: head/sys/kern/kern_rmlock.c
==============================================================================
--- head/sys/kern/kern_rmlock.c Sun Jul 26 10:37:40 2015        (r285887)
+++ head/sys/kern/kern_rmlock.c Sun Jul 26 10:53:32 2015        (r285888)
@@ -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)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to