Browse Source

if SYS_gettid doesn't exist (like under HURD), use getpid() instead

tags/v0.2.2^2
Sylvestre Ledru 14 years ago
parent
commit
5719b7a58d
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      common_linux.h

+ 7
- 1
common_linux.h View File

@@ -86,7 +86,13 @@ static inline int my_set_mempolicy(int mode, const unsigned long *addr, unsigned
return syscall(SYS_set_mempolicy, mode, addr, flag);
}

static inline int my_gettid(void) { return syscall(SYS_gettid); }
static inline int my_gettid(void) {
#ifdef SYS_gettid
return syscall(SYS_gettid);
#else
return getpid();
#endif
}

#endif
#endif

Loading…
Cancel
Save