Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/tests/recursive_mutex.c b/drd/tests/recursive_mutex.c
index ad79b63..3ddfc25 100644
--- a/drd/tests/recursive_mutex.c
+++ b/drd/tests/recursive_mutex.c
@@ -10,6 +10,7 @@
 #include "../../config.h"
 
 
+#if !defined(VGO_darwin)
 static void lock_twice(pthread_mutex_t* const p)
 {
   pthread_mutex_lock(p);
@@ -17,6 +18,7 @@
   pthread_mutex_unlock(p);
   pthread_mutex_unlock(p);
 }
+#endif
 
 int main(int argc, char** argv)
 {
@@ -60,6 +62,10 @@
     pthread_mutex_destroy(&m);
   }
 #endif
+
+// DDD: Darwin doesn't support signals yet, so the alarm() call doesn't kick
+// in, which causes it to hang.
+#if !defined(VGO_darwin)
   {
     pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
 
@@ -68,5 +74,6 @@
     lock_twice(&m);
   }
   printf("Done.\n");
+#endif
   return 0;
 }