summaryrefslogtreecommitdiffstats
path: root/vm/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm/Thread.cpp')
-rw-r--r--vm/Thread.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index f5e302084..ab4c58e7e 100644
--- a/vm/Thread.cpp
+++ b/vm/Thread.cpp
@@ -936,14 +936,7 @@ static bool prepareThread(Thread* thread)
memset(&thread->jniMonitorRefTable, 0, sizeof(thread->jniMonitorRefTable));
-#if defined(__APPLE__)
- pthread_cond_init(&thread->waitCond, NULL);
-#else
- pthread_condattr_t condAttr;
- pthread_condattr_init(&condAttr);
- pthread_condattr_setclock(&condAttr, CLOCK_MONOTONIC);
- pthread_cond_init(&thread->waitCond, &condAttr);
-#endif
+ dvmInitCondForTimedWait(&thread->waitCond);
dvmInitMutex(&thread->waitMutex);
/* Initialize safepoint callback mechanism */