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. build/
  2. oat_process/
  3. oat_runtime/
  4. src/
  5. test/
  6. tools/
  7. Android.mk