summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-10-17 15:34:55 +0000
committerderaadt <deraadt@openbsd.org>2014-10-17 15:34:55 +0000
commit45b8cd10db093096ce5010713ab4d24975566a8f (patch)
tree861b791110012ef3f8fa4ed36992b1e978613b8f
parentAdd the -d flag (limit display depth) for compatibility with FreeBSD, (diff)
downloadwireguard-openbsd-45b8cd10db093096ce5010713ab4d24975566a8f.tar.xz
wireguard-openbsd-45b8cd10db093096ce5010713ab4d24975566a8f.zip
cpu_setperf and perflevel must remain exposed, otherwise a bunch of
MD code needs excess #ifndef SMALL_KERNEL
-rw-r--r--sys/kern/sched_bsd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c
index 67813da2131..f42727254f4 100644
--- a/sys/kern/sched_bsd.c
+++ b/sys/kern/sched_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched_bsd.c,v 1.36 2014/10/17 01:51:39 tedu Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.37 2014/10/17 15:34:55 deraadt Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -565,11 +565,7 @@ schedclock(struct proc *p)
SCHED_UNLOCK(s);
}
-#ifndef SMALL_KERNEL
-/*
- * The code below handles CPU throttling.
- */
-#include <sys/sysctl.h>
+void (*cpu_setperf)(int);
#define PERFPOL_MANUAL 0
#define PERFPOL_AUTO 1
@@ -577,7 +573,11 @@ schedclock(struct proc *p)
int perflevel = 100;
int perfpolicy = PERFPOL_MANUAL;
-void (*cpu_setperf)(int);
+#ifndef SMALL_KERNEL
+/*
+ * The code below handles CPU throttling.
+ */
+#include <sys/sysctl.h>
struct timeout setperf_to;
void setperf_auto(void *);