diff options
author | kib <kib@FreeBSD.org> | 2008-12-06 21:33:44 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-12-06 21:33:44 +0000 |
commit | 2a6c909faeab000884e36118f00ef41b0b6bb2f9 (patch) | |
tree | cae35c6ba7e3bd43a1f45fc8476c54912f9abda5 /sys/i386 | |
parent | d2307b467572f37d71554bac28efd679dfb4305c (diff) | |
download | FreeBSD-src-2a6c909faeab000884e36118f00ef41b0b6bb2f9.zip FreeBSD-src-2a6c909faeab000884e36118f00ef41b0b6bb2f9.tar.gz |
Restore memory clobber, to cause mb on the compiler level too.
Use more sane formatting of the assembler.
Pointed out by: bde
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/atomic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index e800d0e..8c0b95c 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -32,9 +32,9 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#define mb() __asm __volatile("lock;addl $0,(%esp)") -#define wmb() __asm __volatile("lock;addl $0,(%esp)") -#define rmb() __asm __volatile("lock;addl $0,(%esp)") +#define mb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory") +#define wmb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory") +#define rmb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory") /* * Various simple operations on memory, each of which is atomic in the |