diff options
Diffstat (limited to 'libcutils/threads.c')
-rw-r--r-- | libcutils/threads.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libcutils/threads.c b/libcutils/threads.c index 3d8dd4848..036f8c5b7 100644 --- a/libcutils/threads.c +++ b/libcutils/threads.c @@ -35,12 +35,7 @@ #ifndef __ANDROID__ pid_t gettid() { #if defined(__APPLE__) - uint64_t owner; - int rc = pthread_threadid_np(NULL, &owner); - if (rc != 0) { - abort(); - } - return owner; + return syscall(SYS_thread_selfid); #elif defined(__linux__) return syscall(__NR_gettid); #elif defined(_WIN32) |