summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-07-06 09:34:08 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-07-06 09:34:08 +0000
commit056fc36d68af9f71b8980f4c1c61d7fc71bd954f (patch)
tree127690efe61582ecde42d810c1122e0446cec8b3 /sys/arch/hppa
parentdc4ee67851e0c7410f3cf2aaf4b94c0580fd4771 (diff)
Introduce CPU_IS_RUNNING() and us it in scheduler-related code to prevent
waiting on CPUs that didn't spin up. This will allow us to spin down CPUs in the future to save power as well. ok mpi@
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/include/cpu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index b8dfc05117d..6270268518f 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.94 2021/06/02 00:39:26 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.95 2021/07/06 09:34:06 kettenis Exp $ */
/*
* Copyright (c) 2000-2004 Michael Shalayeff
@@ -144,6 +144,7 @@ curcpu(void)
#define CPU_INFO_UNIT(ci) ((ci)->ci_dev ? (ci)->ci_dev->dv_unit : 0)
#define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0)
+#define CPU_IS_RUNNING(ci) ((ci)->ci_flags & CPUF_RUNNING)
#define CPU_INFO_ITERATOR int
#define CPU_INFO_FOREACH(cii, ci) \
for (cii = 0, ci = &cpu_info[0]; cii < ncpus; cii++, ci++)