summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-08-20 20:46:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-16 04:28:29 +0000
commitb45d8a149cf5c85ceb84d8fae0194529a4514adb (patch)
tree2f85b20bbd177ffa368b38a59c53bcb1ac38305c /luni
parent7dac4d2883ccce4ec47e86d8681a942ff1262932 (diff)
parent11592afbbb0b91624cdf4039782d14994b9f5162 (diff)
downloadlibcore-b45d8a149cf5c85ceb84d8fae0194529a4514adb.zip
libcore-b45d8a149cf5c85ceb84d8fae0194529a4514adb.tar.gz
libcore-b45d8a149cf5c85ceb84d8fae0194529a4514adb.tar.bz2
Merge "bionic has always had gettid."
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/native/libcore_io_Posix.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/luni/src/main/native/libcore_io_Posix.cpp b/luni/src/main/native/libcore_io_Posix.cpp
index 51dd8a1..ffeabf7 100644
--- a/luni/src/main/native/libcore_io_Posix.cpp
+++ b/luni/src/main/native/libcore_io_Posix.cpp
@@ -871,8 +871,9 @@ static jint Posix_gettid(JNIEnv* env __unused, jobject) {
return 0;
}
return static_cast<jint>(owner);
+#elif defined(__BIONIC__)
+ return gettid();
#else
- // Neither bionic nor glibc exposes gettid(2).
return syscall(__NR_gettid);
#endif
}