diff options
author | Ben Cheng <bccheng@android.com> | 2009-06-22 22:53:35 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@android.com> | 2009-06-22 22:53:35 -0700 |
commit | ef00a85e7f148f044b14942aa09204e2d0d72738 (patch) | |
tree | d1edffafaf5a0fd3ce9039853d8e2e94b749738f /vm/compiler | |
parent | cc6600c2702c0b29457836acde1cfc4f25c63b67 (diff) | |
download | android_dalvik-ef00a85e7f148f044b14942aa09204e2d0d72738.tar.gz android_dalvik-ef00a85e7f148f044b14942aa09204e2d0d72738.tar.bz2 android_dalvik-ef00a85e7f148f044b14942aa09204e2d0d72738.zip |
Shutdown the compiler thread before the dvmSlayDaemons call is made.
Diffstat (limited to 'vm/compiler')
-rw-r--r-- | vm/compiler/Compiler.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vm/compiler/Compiler.c b/vm/compiler/Compiler.c index 0b5c2116c..9473834a5 100644 --- a/vm/compiler/Compiler.c +++ b/vm/compiler/Compiler.c @@ -144,6 +144,8 @@ static void *compilerThreadStart(void *arg) } pthread_cond_signal(&gDvmJit.compilerQueueEmpty); dvmUnlockMutex(&gDvmJit.compilerLock); + + LOGD("Compiler thread shutting down\n"); return NULL; } @@ -242,6 +244,9 @@ void dvmCompilerShutdown(void) pthread_cond_signal(&gDvmJit.compilerQueueActivity); dvmUnlockMutex(&gDvmJit.compilerLock); - pthread_join(gDvmJit.compilerHandle, &threadReturn); + if (pthread_join(gDvmJit.compilerHandle, &threadReturn) != 0) + LOGW("Compiler thread join failed\n"); + else + LOGD("Compiler thread has shut down\n"); } } |