summaryrefslogtreecommitdiffstats
path: root/runtime/thread_list.h
diff options
context:
space:
mode:
authorChao-ying Fu <chao-ying.fu@intel.com>2014-05-21 11:20:52 -0700
committerIan Rogers <irogers@google.com>2014-05-22 10:25:57 -0700
commit9e36931cc79ca665908db9575126881d1cfdea5a (patch)
tree69099016576581e3e4d6c44ee01a7a6cc7db4b2c /runtime/thread_list.h
parent5da6e2b88258733dd3856543af27ca73b395ef60 (diff)
downloadart-9e36931cc79ca665908db9575126881d1cfdea5a.zip
art-9e36931cc79ca665908db9575126881d1cfdea5a.tar.gz
art-9e36931cc79ca665908db9575126881d1cfdea5a.tar.bz2
Move modify_ldt_lock into global lock order.
Mutex modify_ldt_lock was being removed during runtime shutdown while daemons thread may still detach. Avoid this by placing in global lock order. This fixes cts dalvik vm-tests-tf that hang on some x86 devices. By irogers: also, tidy global locks to agree with enum constants and add extra verification that the global annotalysis order agrees with the LockLevel order. Bumped the oat version and moved the locks as LockLevel additions previously caused entrypoints to be moved. Make unattached lock not handle the default mutex level case by moving the allocated thread ids lock into the global order. Change-Id: I9d03f19d44ea254accf0ceae8022563c77f7a02f Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Diffstat (limited to 'runtime/thread_list.h')
-rw-r--r--runtime/thread_list.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/thread_list.h b/runtime/thread_list.h
index a574340..d46987a 100644
--- a/runtime/thread_list.h
+++ b/runtime/thread_list.h
@@ -132,7 +132,7 @@ class ThreadList {
private:
uint32_t AllocThreadId(Thread* self);
- void ReleaseThreadId(Thread* self, uint32_t id) LOCKS_EXCLUDED(allocated_ids_lock_);
+ void ReleaseThreadId(Thread* self, uint32_t id) LOCKS_EXCLUDED(Locks::allocated_thread_ids_lock_);
bool Contains(Thread* thread) EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_);
bool Contains(pid_t tid) EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_);
@@ -151,8 +151,7 @@ class ThreadList {
LOCKS_EXCLUDED(Locks::thread_list_lock_,
Locks::thread_suspend_count_lock_);
- mutable Mutex allocated_ids_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
- std::bitset<kMaxThreadId> allocated_ids_ GUARDED_BY(allocated_ids_lock_);
+ std::bitset<kMaxThreadId> allocated_ids_ GUARDED_BY(Locks::allocated_thread_ids_lock_);
// The actual list of all threads.
std::list<Thread*> list_ GUARDED_BY(Locks::thread_list_lock_);