Fix at least two deadlocks.

Pretty much every caller that takes the thread list lock can then go on to
cause allocation, which requires the heap lock. The GC always takes the heap
lock first and the thread list lock second (to suspend/resume other threads).
Cue deadlocks.

This patch is a pretty degenerate fix that basically makes the thread list
lock irrelevant; we now always take the heap lock first.

Change-Id: I0537cffb0b841bfb5033789817793734d75dfb31
7 files changed
tree: 211747a79d87a2412c156e42713eea4638bbc340
  1. Android.mk
  2. build/
  3. oat_process/
  4. oat_runtime/
  5. src/
  6. test/
  7. tools/