Implement ObjectReference.MonitorInfo.
Change-Id: Iefc276939b9e569f4ea4d7a5af9a28276a3fb632
diff --git a/src/thread_list.cc b/src/thread_list.cc
index 3ca4cd4..13c965c 100644
--- a/src/thread_list.cc
+++ b/src/thread_list.cc
@@ -612,4 +612,14 @@
allocated_ids_.reset(id);
}
+Thread* ThreadList::FindThreadByThinLockId(uint32_t thin_lock_id) {
+ MutexLock mu(Thread::Current(), *Locks::thread_list_lock_);
+ for (It it = list_.begin(), end = list_.end(); it != end; ++it) {
+ if ((*it)->GetThinLockId() == thin_lock_id) {
+ return *it;
+ }
+ }
+ return NULL;
+}
+
} // namespace art