Browse Source

Adding n32 multiple threads condition.

tags/v0.1.0^2
Wang Qian 14 years ago
parent
commit
c2dad58ad1
2 changed files with 7 additions and 1 deletions
  1. +5
    -1
      common_linux.h
  2. +2
    -0
      common_mips64.h

+ 5
- 1
common_linux.h 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;


+ 2
- 0
common_mips64.h 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;


Loading…
Cancel
Save