Restore memory clobber, to cause mb on the compiler level too.

Use more sane formatting of the assembler.

Pointed out by:	bde
This commit is contained in:
Konstantin Belousov 2008-12-06 21:33:44 +00:00
parent 5622c31582
commit 422dcc2416

View File

@ -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