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

This commit is contained in:
Sylvestre Ledru
2012-07-02 02:50:02 +02:00
parent f22bfe6a55
commit 5719b7a58d

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