diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-02-19 09:08:14 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-02-19 09:08:14 +0000 |
commit | dccd13ba7d753844e8b05f815c65fe2335225c8c (patch) | |
tree | 32535b282d7a8c1e2cb0fb587919fa3f18c1114e /sys/kern | |
parent | f44ff454cd0da5e1133d8f57877628c13d346dc5 (diff) |
Directly include sys/mplock.h when needed instead of depending on
indirect inclusion. Fixes non-MULTIPROCESSOR WITNESS build.
ok visa@ mpi@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_lock.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 <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" @@ -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 /* |