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.h b/src/utils.h
index 78d655e..135ea59 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -8,6 +8,7 @@
 #include "stringpiece.h"
 #include "stringprintf.h"
 
+#include <pthread.h>
 #include <string>
 #include <vector>
 
@@ -180,6 +181,9 @@
 // Returns the calling thread's tid. (The C libraries don't expose this.)
 pid_t GetTid();
 
+// Returns the tid of the thread that owns the given pthread mutex, or 0.
+pid_t GetOwner(pthread_mutex_t* mutex);
+
 // Sets the name of the current thread. The name may be truncated to an
 // implementation-defined limit.
 void SetThreadName(const char* name);