| 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;
|
|
|