Fix rtc::CurrentThreadId() on Android

We have been using the Linux way of getting the thread id on Android,
even though we have a special code path for getting it on Android.

BUG=webrtc:8110

Review-Url: https://codereview.webrtc.org/3001333002
Cr-Commit-Position: refs/heads/master@{#19494}
This commit is contained in:
magjed 2017-08-24 06:41:05 -07:00 committed by Commit Bot
parent 6c36dcb324
commit d950d9eda1

View File

@ -29,10 +29,10 @@ PlatformThreadId CurrentThreadId() {
#elif defined(WEBRTC_POSIX)
#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
ret = pthread_mach_thread_np(pthread_self());
#elif defined(WEBRTC_LINUX)
ret = syscall(__NR_gettid);
#elif defined(WEBRTC_ANDROID)
ret = gettid();
#elif defined(WEBRTC_LINUX)
ret = syscall(__NR_gettid);
#else
// Default implementation for nacl and solaris.
ret = reinterpret_cast<pid_t>(pthread_self());