Use static thread safety analysis when available, and fix the bugs GCC finds.

It's impossible to express the Heap locking and the ThreadList locking with
GCC, but Clang is supposed to be able to do it. This patch does what's possible
for now.

Change-Id: Ib64a890c9d27c6ce255d5003cb755c2ef1beba95
26 files changed
tree: 0a3474cde4028e1915c59393f49c147dd76ad766
  1. .gitignore
  2. Android.mk
  3. build/
  4. jdwpspy/
  5. src/
  6. test/
  7. tools/