Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Unified Diff: runtime/platform/thread_android.cc

Issue 10826233: Add _android files for building DartVM on Android (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporate reviewer's feedback (asiva, Soren Gjesse) Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/thread_android.h ('k') | runtime/platform/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_android.cc
diff --git a/runtime/platform/thread_linux.cc b/runtime/platform/thread_android.cc
similarity index 97%
copy from runtime/platform/thread_linux.cc
copy to runtime/platform/thread_android.cc
index 30e8dcdb34272374b954a7cb08138d3230d51ce4..51e6561d0eba67337309fb2ed2f747384e270d24 100644
--- a/runtime/platform/thread_linux.cc
+++ b/runtime/platform/thread_android.cc
@@ -211,9 +211,6 @@ Monitor::Monitor() {
result = pthread_condattr_init(&cond_attr);
VALIDATE_PTHREAD_RESULT(result);
- result = pthread_condattr_setclock(&cond_attr, CLOCK_MONOTONIC);
- VALIDATE_PTHREAD_RESULT(result);
-
result = pthread_cond_init(data_.cond(), &cond_attr);
VALIDATE_PTHREAD_RESULT(result);
@@ -255,7 +252,8 @@ Monitor::WaitResult Monitor::Wait(int64_t millis) {
} else {
struct timespec ts;
ComputeTimeSpec(&ts, millis);
- int result = pthread_cond_timedwait(data_.cond(), data_.mutex(), &ts);
+ int result = pthread_cond_timedwait_monotonic(
+ data_.cond(), data_.mutex(), &ts);
ASSERT((result == 0) || (result == ETIMEDOUT));
if (result == ETIMEDOUT) {
retval = kTimedOut;
« no previous file with comments | « runtime/platform/thread_android.h ('k') | runtime/platform/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698