OSDN Git Service

Fix a deadlock between thread flip and suspend request.
authorHiroshi Yamauchi <yamauchi@google.com>
Mon, 3 Oct 2016 22:32:01 +0000 (15:32 -0700)
committerHiroshi Yamauchi <yamauchi@google.com>
Thu, 6 Oct 2016 00:52:29 +0000 (17:52 -0700)
commit02e7f1a46d8dbb277d045182cd1fa4b058d55162
treebd14cec6d5c4a545c2b9081d72b6e1b49ec7ef1e
parentd1224dce59eb0019507e41da5e10f12dda66bee4
Fix a deadlock between thread flip and suspend request.

See 31683379#9 for the deadlock scenario.

Make ModifySuspendCount(+1) retry if the thread flip function is set.

Bug: 31683379
Bug: 12687968
Test: test-art, N9 libartd boot, Ritz EAAC with CC.
Test: 129-GetThreadId with gcstress and CC.
Change-Id: Id5cdfcd90a08a2ff497f9f0e2842fa4c613549bc
runtime/thread-inl.h
runtime/thread.cc
runtime/thread.h
runtime/thread_list.cc