diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2024-06-09 21:15:30 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2024-06-09 21:15:30 +0000 |
commit | 977775b0acd19093de50847e8fa120058920b482 (patch) | |
tree | 66e016bafdba6cbc7b249007fd2ed238d874197a /sys/arch/arm | |
parent | a2ef373f1bb8aae51b1708be19723283553a0a6d (diff) |
Add a compiler barrier where missing in CPU_BUSY_CYCLE() implems
Having differences between architectures is asking for problems. And
adding a barrier here just makes sense in most cases. This is also what
cpu_relax() provides in Linux land.
ok kettenis@ claudio@
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/include/cpu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm/include/cpu.h b/sys/arch/arm/include/cpu.h index 1b973d3f569..a598a46bca1 100644 --- a/sys/arch/arm/include/cpu.h +++ b/sys/arch/arm/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.66 2024/02/25 19:15:50 cheloha Exp $ */ +/* $OpenBSD: cpu.h,v 1.67 2024/06/09 21:15:29 jca Exp $ */ /* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */ /* @@ -251,7 +251,7 @@ extern struct cpu_info *cpu_info[MAXCPUS]; void cpu_boot_secondary_processors(void); #endif /* !MULTIPROCESSOR */ -#define CPU_BUSY_CYCLE() do {} while (0) +#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory") #define curpcb curcpu()->ci_curpcb |