Remove libbacktrace definition of gettid.
Also simplifies the Darwin implementation of gettid, because
apparently libbacktrace had a better way of doing it.
Change-Id: I9e14f9176b167405a5aaa5b8a0db0327c7126271
diff --git a/libcutils/threads.c b/libcutils/threads.c
index 3d8dd48..036f8c5 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)