diff options
author | Xianyi Zhang <xianyi@iscas.ac.cn> | 2011-03-02 13:38:32 +0800 |
---|---|---|
committer | Xianyi Zhang <xianyi@iscas.ac.cn> | 2011-03-02 13:38:32 +0800 |
commit | 588737210d1db00f7e271ea451c26380e43c1ed9 (patch) | |
tree | fd3a9f2236e87d39498a7584df0ef49cd16b8694 /common_linux.h | |
parent | cdf33edac37eb667a3c1c2fc2ca9450781a03933 (diff) | |
download | openblas-588737210d1db00f7e271ea451c26380e43c1ed9.tar.gz openblas-588737210d1db00f7e271ea451c26380e43c1ed9.tar.bz2 openblas-588737210d1db00f7e271ea451c26380e43c1ed9.zip |
Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34. Fixed #12. Thank Mr.Ei-ji Nakama providing this patch.
Diffstat (limited to 'common_linux.h')
-rw-r--r-- | common_linux.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common_linux.h b/common_linux.h index d18cd2b72..8b3d44bfa 100644 --- a/common_linux.h +++ b/common_linux.h @@ -68,8 +68,9 @@ extern long int syscall (long int __sysno, ...); static inline int my_mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask, unsigned long maxnode, unsigned flags) { - - return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); +//Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34 + unsigned long null_nodemask=0; + return syscall(SYS_mbind, addr, len, mode, &null_nodemask, maxnode, flags); } static inline int my_set_mempolicy(int mode, const unsigned long *addr, unsigned long flag) { |