make WMB / MB safer on x86-64
make it so that if (foo) RMB; else MB; is always done correctly and without syntax surprises
This commit is contained in:
parent
7e39ffe113
commit
2ddc96c9e5
|
@ -61,11 +61,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define MB __asm__ __volatile__("": : :"memory")
|
#define MB do { __asm__ __volatile__("": : :"memory"); } while (0)
|
||||||
#define WMB __asm__ __volatile__("": : :"memory")
|
#define WMB do { __asm__ __volatile__("": : :"memory"); } while (0)
|
||||||
#else
|
#else
|
||||||
#define MB
|
#define MB do {} while (0)
|
||||||
#define WMB
|
#define WMB do {} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void __inline blas_lock(volatile BLASULONG *address){
|
static void __inline blas_lock(volatile BLASULONG *address){
|
||||||
|
|
Loading…
Reference in New Issue