summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2018-06-15 13:59:53 +0000
committervisa <visa@openbsd.org>2018-06-15 13:59:53 +0000
commit51f2d5aa02e01b59d755d553fc45e8e9ff6b0db0 (patch)
tree7d659788d7261b234af71c323b193b826e4c95fa /sys
parentFix the lock order problem found by witness. Release the lock for (diff)
downloadwireguard-openbsd-51f2d5aa02e01b59d755d553fc45e8e9ff6b0db0.tar.xz
wireguard-openbsd-51f2d5aa02e01b59d755d553fc45e8e9ff6b0db0.zip
Simplify #ifdefs. The kernel_lock symbol is no longer needed when
building a uniprocessor kernel with WITNESS. OK mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_lock.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 0c3e40e721d..67dcff4318c 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_lock.c,v 1.65 2018/06/08 15:38:15 guenther Exp $ */
+/* $OpenBSD: kern_lock.c,v 1.66 2018/06/15 13:59:53 visa Exp $ */
/*
* Copyright (c) 2017 Visa Hankala
@@ -27,11 +27,6 @@
#include <ddb/db_output.h>
-#if defined(MULTIPROCESSOR) || defined(WITNESS)
-#include <sys/mplock.h>
-struct __mp_lock kernel_lock;
-#endif
-
#ifdef MP_LOCKDEBUG
#ifndef DDB
#error "MP_LOCKDEBUG requires DDB"
@@ -43,6 +38,9 @@ int __mp_lock_spinout = 200000000;
#ifdef MULTIPROCESSOR
+#include <sys/mplock.h>
+struct __mp_lock kernel_lock;
+
/*
* Functions for manipulating the kernel_lock. We put them here
* so that they show up in profiles.