We can't use pthread_condattr_setclock() in NaCl.
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 3 Sep 2013 11:38:39 +0000 (11:38 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 3 Sep 2013 11:38:39 +0000 (11:38 +0000)
TEST=cctest/test-condition-variable
R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/23494020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/platform/condition-variable.cc

index 84df976..e2bf388 100644 (file)
@@ -41,8 +41,8 @@ ConditionVariable::ConditionVariable() {
   // TODO(bmeurer): The test for V8_LIBRT_NOT_AVAILABLE is a temporary
   // hack to support cross-compiling Chrome for Android in AOSP. Remove
   // this once AOSP is fixed.
-#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || V8_LIBC_GLIBC) && \
-    !V8_LIBRT_NOT_AVAILABLE
+#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+     (V8_OS_LINUX && V8_LIBC_GLIBC)) && !V8_LIBRT_NOT_AVAILABLE
   // On Free/Net/OpenBSD and Linux with glibc we can change the time
   // source for pthread_cond_timedwait() to use the monotonic clock.
   pthread_condattr_t attr;
@@ -107,8 +107,8 @@ bool ConditionVariable::WaitFor(Mutex* mutex, const TimeDelta& rel_time) {
   // TODO(bmeurer): The test for V8_LIBRT_NOT_AVAILABLE is a temporary
   // hack to support cross-compiling Chrome for Android in AOSP. Remove
   // this once AOSP is fixed.
-#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || V8_LIBC_GLIBC) && \
-    !V8_LIBRT_NOT_AVAILABLE
+#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+     (V8_OS_LINUX && V8_LIBC_GLIBC)) && !V8_LIBRT_NOT_AVAILABLE
   // On Free/Net/OpenBSD and Linux with glibc we can change the time
   // source for pthread_cond_timedwait() to use the monotonic clock.
   result = clock_gettime(CLOCK_MONOTONIC, &ts);