summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-02-11 00:05:26 +0000
committereivind <eivind@FreeBSD.org>1998-02-11 00:05:26 +0000
commitfeb116808c79cfedb794e13d8ffd6a87ace2749c (patch)
tree9a9a26d7c18367556f0bd840e431884957de029c /sys/kern/kern_lock.c
parent78287d51b2b6d4a8f7fa3e7f1bc47f5806a5964f (diff)
downloadFreeBSD-src-feb116808c79cfedb794e13d8ffd6a87ace2749c.zip
FreeBSD-src-feb116808c79cfedb794e13d8ffd6a87ace2749c.tar.gz
Include SIMPLELOCK_DEBUG functions even if SMP if compiling LINT; give
an error for the combination if _not_ compiling LINT.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index ea3e8fc..97063b5 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -38,9 +38,11 @@
* SUCH DAMAGE.
*
* @(#)kern_lock.c 8.18 (Berkeley) 5/21/95
- * $Id: kern_lock.c,v 1.15 1998/02/04 22:32:32 eivind Exp $
+ * $Id: kern_lock.c,v 1.16 1998/02/06 12:13:23 eivind Exp $
*/
+#include "opt_lint.h"
+
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/lock.h>
@@ -462,7 +464,7 @@ lockmgr_printinfo(lkp)
printf(" with %d pending", lkp->lk_waitcount);
}
-#if defined(SIMPLELOCK_DEBUG) && NCPUS == 1
+#if defined(SIMPLELOCK_DEBUG) && (NCPUS == 1 || defined(COMPILING_LINT))
#include <sys/kernel.h>
#include <sys/sysctl.h>
@@ -555,4 +557,6 @@ _simple_unlock(alp, id, l)
if (curproc)
curproc->p_simple_locks--;
}
+#elif defined(SIMPLELOCK_DEBUG)
+#error "SIMPLELOCK_DEBUG is not compatible with SMP!"
#endif /* SIMPLELOCK_DEBUG && NCPUS == 1 */
OpenPOWER on IntegriCloud