diff options
author | 2004-06-16 18:27:26 +0000 | |
---|---|---|
committer | 2004-06-16 18:27:26 +0000 | |
commit | 6d55f7f984eb7154443a3a231fa19a88b5824ef7 (patch) | |
tree | 075350d696e15a276876d57e0b5c98551a55ce4a | |
parent | Use i386_ipi_db only with DDB (diff) | |
download | wireguard-openbsd-6d55f7f984eb7154443a3a231fa19a88b5824ef7.tar.xz wireguard-openbsd-6d55f7f984eb7154443a3a231fa19a88b5824ef7.zip |
We need __splbarrier to compile kernel, tho it should be
replaced with a real gcc barrier.
ok deraadt@
-rw-r--r-- | sys/arch/i386/include/intr.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/i386/include/intr.h b/sys/arch/i386/include/intr.h index 9d7a7816cf0..1169873a9f6 100644 --- a/sys/arch/i386/include/intr.h +++ b/sys/arch/i386/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.21 2004/06/13 21:49:16 niklas Exp $ */ +/* $OpenBSD: intr.h,v 1.22 2004/06/16 18:27:26 grange Exp $ */ /* $NetBSD: intr.h,v 1.5 1996/05/13 06:11:28 mycroft Exp $ */ /* @@ -59,6 +59,16 @@ extern int spllower(int); extern void splx(int); extern void softintr(int, int); +/* + * compiler barrier: prevent reordering of instructions. + * XXX something similar will move to <sys/cdefs.h> + * or thereabouts. + * This prevents the compiler from reordering code around + * this "instruction", acting as a sequence point for code generation. + */ + +#define __splbarrier() __asm __volatile("":::"memory") + /* SPL asserts */ #ifdef DIAGNOSTIC /* |