summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r--sys/kern/kern_sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c
index ce9e80066a3..20ae05d0001 100644
--- a/sys/kern/kern_sched.c
+++ b/sys/kern/kern_sched.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sched.c,v 1.51 2018/07/12 01:23:38 cheloha Exp $ */
+/* $OpenBSD: kern_sched.c,v 1.52 2018/09/26 17:23:13 cheloha Exp $ */
/*
* Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org>
*
@@ -832,6 +832,12 @@ sysctl_hwncpuonline(void)
return cpuset_cardinality(&sched_all_cpus);
}
+int
+cpu_is_online(struct cpu_info *ci)
+{
+ return cpuset_isset(&sched_all_cpus, ci);
+}
+
#ifdef __HAVE_CPU_TOPOLOGY
#include <sys/sysctl.h>