diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-07-06 09:34:08 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-07-06 09:34:08 +0000 |
commit | 056fc36d68af9f71b8980f4c1c61d7fc71bd954f (patch) | |
tree | 127690efe61582ecde42d810c1122e0446cec8b3 /sys/arch/mips64/include | |
parent | dc4ee67851e0c7410f3cf2aaf4b94c0580fd4771 (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/mips64/include')
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index 79b0a2484ca..57aa201089a 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.134 2021/06/02 00:39:26 cheloha Exp $ */ +/* $OpenBSD: cpu.h,v 1.135 2021/07/06 09:34:06 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -225,6 +225,7 @@ extern void (*cpu_idle_cycle_func)(void); extern struct cpu_info *get_cpu_info(int); #define curcpu() getcurcpu() #define CPU_IS_PRIMARY(ci) ((ci)->ci_flags & CPUF_PRIMARY) +#define CPU_IS_RUNNING(ci) ((ci)->ci_flags & CPUF_RUNNING) #define cpu_number() (curcpu()->ci_cpuid) extern struct cpuset cpus_running; @@ -249,6 +250,7 @@ void smp_rendezvous_cpus(unsigned long, void (*)(void *), void *arg); #define MAXCPUS 1 #define curcpu() (&cpu_info_primary) #define CPU_IS_PRIMARY(ci) 1 +#define CPU_IS_RUNNING(ci) 1 #define cpu_number() 0UL #define cpu_unidle(ci) #define get_cpu_info(i) (&cpu_info_primary) |