From: jsg Date: Mon, 19 Feb 2018 09:08:13 +0000 (+0000) Subject: Directly include sys/mplock.h when needed instead of depending on X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0d50a1e8a652bce5ce6c8dd21b6b677aef443701;p=openbsd Directly include sys/mplock.h when needed instead of depending on indirect inclusion. Fixes non-MULTIPROCESSOR WITNESS build. ok visa@ mpi@ --- diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 64c5a1f6319..6529df4bfb8 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lock.c,v 1.57 2018/02/14 08:55:12 mpi Exp $ */ +/* $OpenBSD: kern_lock.c,v 1.58 2018/02/19 09:08:13 jsg Exp $ */ /* * Copyright (c) 2017 Visa Hankala @@ -26,6 +26,11 @@ #include +#if defined(MULTIPROCESSOR) || defined(WITNESS) +#include +struct __mp_lock kernel_lock; +#endif + #ifdef MP_LOCKDEBUG #ifndef DDB #error "MP_LOCKDEBUG requires DDB" @@ -35,10 +40,6 @@ int __mp_lock_spinout = 200000000; #endif /* MP_LOCKDEBUG */ -#if defined(MULTIPROCESSOR) || defined(WITNESS) -struct __mp_lock kernel_lock; -#endif - #ifdef MULTIPROCESSOR /*