svn commit: r286315 - stable/10/sys/kern

Andrey V. Elsukov ae at FreeBSD.org
Wed Aug 5 11:00:00 UTC 2015


Author: ae
Date: Wed Aug  5 10:59:59 2015
New Revision: 286315
URL: https://svnweb.freebsd.org/changeset/base/286315

Log:
  MFC r285888:
    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.

Modified:
  stable/10/sys/kern/kern_rmlock.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_rmlock.c
==============================================================================
--- stable/10/sys/kern/kern_rmlock.c	Wed Aug  5 10:50:33 2015	(r286314)
+++ stable/10/sys/kern/kern_rmlock.c	Wed Aug  5 10:59:59 2015	(r286315)
@@ -581,7 +581,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)


More information about the svn-src-all mailing list