Adding n32 multiple threads condition.

This commit is contained in:
Wang Qian 2011-12-01 16:33:11 +00:00
parent 66904fc4e8
commit c2dad58ad1
2 changed files with 7 additions and 1 deletions

View File

@ -68,8 +68,12 @@ 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) {
#if defined (LOONGSON3B)
#if defined (LOONGSON3B)
#if defined (__64BIT__)
return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
#else
return 0; //NULL Implementation on Loongson 3B 32bit.
#endif
#else
//Fixed randomly SEGFAULT when nodemask==NULL with above Linux 2.6.34
unsigned long null_nodemask=0;

View File

@ -120,6 +120,7 @@ static inline unsigned int rpcc(void){
}
#if defined(LOONGSON3A) || defined(LOONGSON3B)
#ifndef NO_AFFINITY
#define WHEREAMI
static inline int WhereAmI(void){
int ret=0;
@ -131,6 +132,7 @@ static inline int WhereAmI(void){
}
#endif
#endif
static inline int blas_quickdivide(blasint x, blasint y){
return x / y;