summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2014-06-03 13:30:24 +0000
committerkettenis <kettenis@openbsd.org>2014-06-03 13:30:24 +0000
commit1deb03bb291cbc28bbb81aca7573c6e1fc5a9a0d (patch)
treeb25e9aa81ccda62e1b6d8d028a415d1c39c412b4
parentas miod found out, mandocdb is slightly intrusive and wants to know where (diff)
downloadwireguard-openbsd-1deb03bb291cbc28bbb81aca7573c6e1fc5a9a0d.tar.xz
wireguard-openbsd-1deb03bb291cbc28bbb81aca7573c6e1fc5a9a0d.zip
Use a proper compiler barrier; just having the inline asm for the "sync"
instruction depend on ci->ci_cpl makes the compiler generate strange code and might not be enough to stop the compiler moving instructions around. ok jsing@
-rw-r--r--sys/arch/hppa/include/intr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h
index 864509b2f27..2cf1052acf2 100644
--- a/sys/arch/hppa/include/intr.h
+++ b/sys/arch/hppa/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.39 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: intr.h,v 1.40 2014/06/03 13:30:24 kettenis Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -105,7 +105,7 @@ splraise(int ncpl)
if (ocpl < ncpl)
ci->ci_cpl = ncpl;
- __asm volatile ("sync" : "+r" (ci->ci_cpl));
+ __asm volatile ("sync" : : : "memory");
return (ocpl);
}