diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-06-16 18:27:27 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-06-16 18:27:27 +0000 |
commit | 07ecbfaf8d7644113b1b312b63111239d4b01f3e (patch) | |
tree | 834ed8883b59951fa4d336a726011c670eb70d19 /sys/arch/i386 | |
parent | 7ac3e87fc9e5a8d6b04a8514d582be6ac690a68b (diff) |
We need __splbarrier to compile kernel, tho it should be
replaced with a real gcc barrier.
ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-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 /* |