Browse Source

make WMB / MB safer on x86-64

make it so that

if (foo)
	RMB;
else
	MB;

is always done correctly and without syntax surprises
tags/v0.3.1
Arjan van de Ven 7 years ago
parent
commit
2ddc96c9e5
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      common_x86_64.h

+ 4
- 4
common_x86_64.h View File

@@ -61,11 +61,11 @@
*/

#ifdef __GNUC__
#define MB __asm__ __volatile__("": : :"memory")
#define WMB __asm__ __volatile__("": : :"memory")
#define MB do { __asm__ __volatile__("": : :"memory"); } while (0)
#define WMB do { __asm__ __volatile__("": : :"memory"); } while (0)
#else
#define MB
#define WMB
#define MB do {} while (0)
#define WMB do {} while (0)
#endif

static void __inline blas_lock(volatile BLASULONG *address){


Loading…
Cancel
Save