summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-06-09 21:15:30 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-06-09 21:15:30 +0000
commit977775b0acd19093de50847e8fa120058920b482 (patch)
tree66e016bafdba6cbc7b249007fd2ed238d874197a /sys/arch/i386
parenta2ef373f1bb8aae51b1708be19723283553a0a6d (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/i386')
-rw-r--r--sys/arch/i386/include/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 565f6159c74..d9b5cb50bc9 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.190 2024/06/07 16:53:35 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.191 2024/06/09 21:15:29 jca Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -262,7 +262,7 @@ void cpu_unidle(struct cpu_info *);
#define cpu_kick(ci)
#define cpu_unidle(ci)
-#define CPU_BUSY_CYCLE() do {} while (0)
+#define CPU_BUSY_CYCLE() __asm volatile ("" ::: "memory")
#endif