Bug 1307723 - Use USE_CLOCK_API on Android 64-bit. r=terrence
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 06 Oct 2016 15:53:11 +0900
changeset 316804 68bbfe4642cb35ef9947914386fa566f4ffe6d87
parent 316803 a580d0d432be36f46d750580391c2b62aba0bfb7
child 316805 c24253346eac4e0c6701840f0797c6ff742b1eb2
push id32932
push userphilringnalda@gmail.com
push dateFri, 07 Oct 2016 03:24:25 +0000
treeherderautoland@7affb66131bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1307723
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1307723 - Use USE_CLOCK_API on Android 64-bit. r=terrence MozReview-Commit-ID: GTPaqSbkh9T
js/src/threading/posix/ConditionVariable.cpp
--- a/js/src/threading/posix/ConditionVariable.cpp
+++ b/js/src/threading/posix/ConditionVariable.cpp
@@ -18,18 +18,19 @@
 #include "threading/posix/MutexPlatformData.h"
 
 using mozilla::CheckedInt;
 using mozilla::TimeDuration;
 using mozilla::TimeStamp;
 
 static const long NanoSecPerSec = 1000000000;
 
-// Android & macOS 10.12 has the clock functions, but not pthread_condattr_setclock.
-#if defined(HAVE_CLOCK_MONOTONIC) && !defined(__ANDROID__) && !defined(__APPLE__)
+// Android 32-bit & macOS 10.12 has the clock functions, but not pthread_condattr_setclock.
+#if defined(HAVE_CLOCK_MONOTONIC) && \
+    !(defined(__ANDROID__) && !defined(__LP64__)) && !defined(__APPLE__)
 # define USE_CLOCK_API
 #endif
 
 #ifdef USE_CLOCK_API
 // The C++ specification defines std::condition_variable::wait_for in terms of
 // std::chrono::steady_clock, which is closest to CLOCK_MONOTONIC.
 static const clockid_t WhichClock = CLOCK_MONOTONIC;