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:
Arjan van de Ven 2018-06-17 18:06:24 +00:00
parent 7e39ffe113
commit 2ddc96c9e5
1 changed files with 4 additions and 4 deletions

View File

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