Add locking to the heap.

Now tsan is happy with us too, at least on the host.

Change-Id: Ib4657f56be2014de832dff8886b63843a40ea788
diff --git a/src/utils.cc b/src/utils.cc
index d890d29..fed8a5e 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -3,6 +3,7 @@
 
 #include "utils.h"
 
+#include <pthread.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -251,6 +252,15 @@
 #endif
 }
 
+pid_t GetOwner(pthread_mutex_t* mutex) {
+#ifdef __BIONIC__
+  return static_cast<pid_t>(((mutex)->value >> 16) & 0xffff);
+#else
+  UNIMPLEMENTED(FATAL);
+  return 0;
+#endif
+}
+
 }  // namespace art
 
 // Neither bionic nor glibc exposes gettid(2).