summaryrefslogtreecommitdiff
path: root/sys/arch/sh
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/sh
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/sh')
-rw-r--r--sys/arch/sh/include/cpu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sh/include/cpu.h b/sys/arch/sh/include/cpu.h
index bf51581b84a..15b5b9c7522 100644
--- a/sys/arch/sh/include/cpu.h
+++ b/sys/arch/sh/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.31 2021/06/02 00:39:27 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.32 2021/07/06 09:34:07 kettenis Exp $ */
/* $NetBSD: cpu.h,v 1.41 2006/01/21 04:24:12 uwe Exp $ */
/*-
@@ -78,6 +78,7 @@ extern struct cpu_info cpu_info_store;
#define curcpu() (&cpu_info_store)
#define cpu_number() 0
#define CPU_IS_PRIMARY(ci) 1
+#define CPU_IS_RUNNING(ci) 1
#define CPU_INFO_ITERATOR int
#define CPU_INFO_FOREACH(cii, ci) \
for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL)