diff options
author | Elliott Hughes <enh@google.com> | 2012-05-03 18:35:53 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-05-03 18:35:53 -0700 |
commit | 0b88861edfe5c0d57e0bb4a1cccb04f1916b5e9f (patch) | |
tree | 4b68db62ffd23980f58ccb53c68a1f3aa2583c0d /vm/Thread.cpp | |
parent | 901167c1d78403bedcb48a20f46a971fae392a27 (diff) | |
parent | 93a44a282327b44a84af59f201eaf58df02c449f (diff) | |
download | android_dalvik-0b88861edfe5c0d57e0bb4a1cccb04f1916b5e9f.tar.gz android_dalvik-0b88861edfe5c0d57e0bb4a1cccb04f1916b5e9f.tar.bz2 android_dalvik-0b88861edfe5c0d57e0bb4a1cccb04f1916b5e9f.zip |
resolved conflicts for merge of 93a44a28 to jb-dev-plus-aosp
Change-Id: I9c1f2e37602bea86e70333d2b274665e99fcbd92
Diffstat (limited to 'vm/Thread.cpp')
-rw-r--r-- | vm/Thread.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/vm/Thread.cpp b/vm/Thread.cpp index d82f15afe..aa2352af2 100644 --- a/vm/Thread.cpp +++ b/vm/Thread.cpp @@ -3540,15 +3540,25 @@ void dvmNukeThread(Thread* thread) * The target thread can continue to execute between the two signals. * (The first just causes debuggerd to attach to it.) */ - ALOGD("threadid=%d: sending two SIGSTKFLTs to threadid=%d (tid=%d) to" - " cause debuggerd dump", - dvmThreadSelf()->threadId, thread->threadId, thread->systemTid); - killResult = pthread_kill(thread->handle, SIGSTKFLT); +#ifdef SIGSTKFLT +#define SIG SIGSTKFLT +#define SIGNAME "SIGSTKFLT" +#elif defined(SIGEMT) +#define SIG SIGEMT +#define SIGNAME "SIGEMT" +#else +#error No signal available for dvmNukeThread +#endif + + ALOGD("threadid=%d: sending two " SIGNAME "s to threadid=%d (tid=%d) to" + " cause debuggerd dump", + dvmThreadSelf()->threadId, thread->threadId, thread->systemTid); + killResult = pthread_kill(thread->handle, SIG); if (killResult != 0) { ALOGD("NOTE: pthread_kill #1 failed: %s", strerror(killResult)); } usleep(2 * 1000 * 1000); // TODO: timed-wait until debuggerd attaches - killResult = pthread_kill(thread->handle, SIGSTKFLT); + killResult = pthread_kill(thread->handle, SIG); if (killResult != 0) { ALOGD("NOTE: pthread_kill #2 failed: %s", strerror(killResult)); } |