diff options
| author | Dan Albert <danalbert@google.com> | 2015-04-30 12:52:21 -0700 |
|---|---|---|
| committer | Christopher Ferris <cferris@google.com> | 2015-05-13 13:44:34 -0700 |
| commit | 428fad97a0c9c3def1489b16f0257a9cbcfd43f8 (patch) | |
| tree | 78dd414554390090d9b9f436b006f9a634d067f7 /libcutils | |
| parent | cd206b3900639c44767cd892bccfbffabf222f67 (diff) | |
| download | system_core-428fad97a0c9c3def1489b16f0257a9cbcfd43f8.zip system_core-428fad97a0c9c3def1489b16f0257a9cbcfd43f8.tar.gz system_core-428fad97a0c9c3def1489b16f0257a9cbcfd43f8.tar.bz2 | |
Remove libbacktrace definition of gettid.
Also simplifies the Darwin implementation of gettid, because
apparently libbacktrace had a better way of doing it.
Bug: 19517541
(cherry picked from commit 23f750b068ddf5b20fb5d153a798b22562368992)
Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
Diffstat (limited to 'libcutils')
| -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 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) |
