OSDN Git Service

Prevent holding stale Thread pointers
authorMathieu Chartier <mathieuc@google.com>
Mon, 18 Apr 2016 18:43:29 +0000 (11:43 -0700)
committerMathieu Chartier <mathieuc@google.com>
Mon, 18 Apr 2016 22:29:53 +0000 (15:29 -0700)
commit61b3cd45c5e3a5c24f7ccce94843a718375f9b7a
treefc71e27e0ddf6be1f672b69524b7ee978fd9d29c
parent74b3c8f3850c2e4a7b17e9821ad78b59e6f8e047
Prevent holding stale Thread pointers

It is only really safe to hold non-self Thread* if you hold the
thread list lock. Changed a few places to use thread ids instead
of Thread.

Bug: 28223501

(cherry picked from commit 81c170fede9af9174aba71428334ac8f366a4b4f)

Change-Id: I15e50b699303a5c3739e4d19c153dd306e2ee504
runtime/monitor.cc
runtime/monitor.h
runtime/thread.h
runtime/thread_list.cc
runtime/thread_list.h