summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2006-05-09 09:38:35 +0000
committerotto <otto@openbsd.org>2006-05-09 09:38:35 +0000
commitd01defa1d0121f89079e6be2783dff6db978e350 (patch)
tree0aa721d261dc69cd1421762d63d813fe4dba280b
parentspelling (diff)
downloadwireguard-openbsd-d01defa1d0121f89079e6be2783dff6db978e350.tar.xz
wireguard-openbsd-d01defa1d0121f89079e6be2783dff6db978e350.zip
Move the sti to after the memory write. We do not want execution of
this and microtime() to interleave. ok deraadt@ toby@ mickey@
-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 568a2ef2de5..9e7082860f6 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.75 2006/04/27 15:37:53 mickey Exp $ */
+/* $OpenBSD: cpu.h,v 1.76 2006/05/09 09:38:35 otto Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -261,9 +261,9 @@ extern u_quad_t pentium_base_tsc;
if (pentium_mhz) { \
__asm __volatile("cli\n" \
"rdtsc\n" \
- "sti\n" \
: "=A" (pentium_base_tsc) \
: ); \
+ __asm __volatile("sti"); \
} \
} while (0)
#endif