diff options
Diffstat (limited to 'libbacktrace/thread_utils.c')
| -rw-r--r-- | libbacktrace/thread_utils.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/libbacktrace/thread_utils.c b/libbacktrace/thread_utils.c index 6f4cd3c..e75f56e 100644 --- a/libbacktrace/thread_utils.c +++ b/libbacktrace/thread_utils.c @@ -16,25 +16,12 @@ #include "thread_utils.h" -#if defined(__APPLE__) +#if !defined(__BIONIC__) -#include <sys/syscall.h> - -// Mac OS >= 10.6 has a system call equivalent to Linux's gettid(). -pid_t gettid() { - return syscall(SYS_thread_selfid); -} - -#elif !defined(__BIONIC__) - -// glibc doesn't implement or export either gettid or tgkill. +// glibc doesn't implement or export tgkill. #include <unistd.h> #include <sys/syscall.h> -pid_t gettid() { - return syscall(__NR_gettid); -} - int tgkill(int tgid, int tid, int sig) { return syscall(__NR_tgkill, tgid, tid, sig); } |
