summaryrefslogtreecommitdiff
path: root/common_linux.h
diff options
context:
space:
mode:
authorZhang Xianyi <traits.zhang@gmail.com>2013-07-09 15:38:03 +0800
committerZhang Xianyi <traits.zhang@gmail.com>2013-07-09 15:38:03 +0800
commitf54f5bac9e9b0127052a23aaa7c9cfc4170b1f00 (patch)
treef8b7ed41b450ef937ba1cb9a11e6aab8bc3be183 /common_linux.h
parent5d3312142a2926bad34924971208673818947120 (diff)
downloadopenblas-f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00.tar.gz
openblas-f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00.tar.bz2
openblas-f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00.zip
Refs #248. Fixed the LSB compatiable issue for BLAS only.
For example, make CC=lsbcc NO_LAPACK=1.
Diffstat (limited to 'common_linux.h')
-rw-r--r--common_linux.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/common_linux.h b/common_linux.h
index 6766ff37c..afc77b4a2 100644
--- a/common_linux.h
+++ b/common_linux.h
@@ -65,9 +65,16 @@ extern long int syscall (long int __sysno, ...);
#endif
#endif
+
+
static inline int my_mbind(void *addr, unsigned long len, int mode,
unsigned long *nodemask, unsigned long maxnode,
unsigned flags) {
+#if defined (__LSB_VERSION__)
+// So far, LSB (Linux Standard Base) don't support syscall().
+// https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482
+ return 0;
+#else
#if defined (LOONGSON3B)
#if defined (__64BIT__)
return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
@@ -79,11 +86,17 @@ static inline int my_mbind(void *addr, unsigned long len, int mode,
// unsigned long null_nodemask=0;
return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
#endif
+#endif
}
static inline int my_set_mempolicy(int mode, const unsigned long *addr, unsigned long flag) {
-
+#if defined (__LSB_VERSION__)
+// So far, LSB (Linux Standard Base) don't support syscall().
+// https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482
+ return 0;
+#else
return syscall(SYS_set_mempolicy, mode, addr, flag);
+#endif
}
static inline int my_gettid(void) {