Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jul 2015 10:53:33 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285888 - head/sys/kern
Message-ID:  <201507261053.t6QArX3q081202@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507261053.t6QArX3q081202>