Skip to content

Instantly share code, notes, and snippets.

@xianyi
Created April 28, 2012 09:33
Show Gist options
  • Save xianyi/2517475 to your computer and use it in GitHub Desktop.
Save xianyi/2517475 to your computer and use it in GitHub Desktop.
Patch for my_mbind in OpenBLAS
diff --git a/common_linux.h b/common_linux.h
index b0381d9..8d9019a 100644
--- a/common_linux.h
+++ b/common_linux.h
@@ -76,8 +76,8 @@ static inline int my_mbind(void *addr, unsigned long len, int mode,
#endif
#else
//Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34
-// unsigned long null_nodemask=0;
- return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
+ unsigned long null_nodemask=0;
+ return syscall(SYS_mbind, addr, len, mode, &null_nodemask, maxnode, flags);
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment