summaryrefslogtreecommitdiffstats
path: root/runtime/thread_list.h
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-08-27 23:43:46 -0700
committerBrian Carlstrom <bdc@google.com>2014-08-28 15:37:27 -0700
commitba32de47e32f436d7c11cb4a2e78bdd4ad4dc5d2 (patch)
tree1b56397dfce317d2034feebfb2191bcb09b78823 /runtime/thread_list.h
parent14515d738dadf88e3e00b7dd1bd69899c4df4b91 (diff)
downloadandroid_art-ba32de47e32f436d7c11cb4a2e78bdd4ad4dc5d2.tar.gz
android_art-ba32de47e32f436d7c11cb4a2e78bdd4ad4dc5d2.tar.bz2
android_art-ba32de47e32f436d7c11cb4a2e78bdd4ad4dc5d2.zip
Fix issue with Thread.setName hanging after Thread.start
When suspending a thread by peer the invariant that only attached threads are suspended must be maintained. Add a ThreadList::Contains check which requires making this method non-static. Add some extra thread logging. Bug: 17302037 (cherry picked from commit 37c16453a92bbf1a47f042000318a1b60381017d) Change-Id: I51832785d4b4b431e035318e75635f442e89a1fb
Diffstat (limited to 'runtime/thread_list.h')
-rw-r--r--runtime/thread_list.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/thread_list.h b/runtime/thread_list.h
index 1b67ac0588..bb4f7750f5 100644
--- a/runtime/thread_list.h
+++ b/runtime/thread_list.h
@@ -66,8 +66,8 @@ class ThreadList {
// If the thread should be suspended then value of request_suspension should be true otherwise
// the routine will wait for a previous suspend request. If the suspension times out then *timeout
// is set to true.
- static Thread* SuspendThreadByPeer(jobject peer, bool request_suspension, bool debug_suspension,
- bool* timed_out)
+ Thread* SuspendThreadByPeer(jobject peer, bool request_suspension, bool debug_suspension,
+ bool* timed_out)
EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_suspend_thread_lock_)
LOCKS_EXCLUDED(Locks::mutator_lock_,
Locks::thread_list_lock_,