diff options
Diffstat (limited to 'vm/alloc/HeapSource.cpp')
-rw-r--r-- | vm/alloc/HeapSource.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/vm/alloc/HeapSource.cpp b/vm/alloc/HeapSource.cpp index 316288491..176a71834 100644 --- a/vm/alloc/HeapSource.cpp +++ b/vm/alloc/HeapSource.cpp @@ -532,14 +532,7 @@ static void *gcDaemonThread(void* arg) static bool gcDaemonStartup() { dvmInitMutex(&gHs->gcThreadMutex); -#if defined(__APPLE__) - pthread_cond_init(&gHs->gcThreadCond, NULL); -#else - pthread_condattr_t condAttr; - pthread_condattr_init(&condAttr); - pthread_condattr_setclock(&condAttr, CLOCK_MONOTONIC); - pthread_cond_init(&gHs->gcThreadCond, &condAttr); -#endif // defined(__APPLE__) + dvmInitCondForTimedWait(&gHs->gcThreadCond); gHs->gcThreadShutdown = false; gHs->hasGcThread = dvmCreateInternalThread(&gHs->gcThread, "GC", gcDaemonThread, NULL); |