]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Print an error message if sem_init() is called by a client program on Darwin.
authorBart Van Assche <bvanassche@acm.org>
Thu, 23 Jul 2009 17:52:51 +0000 (17:52 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 23 Jul 2009 17:52:51 +0000 (17:52 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10565

drd/drd_semaphore.c

index f2e38e2f4f6762fac64589f20e4e39c6fd4a0273..e064310b32b78e7e865869ccd76e0a4b34a2ea22 100644 (file)
@@ -200,7 +200,18 @@ struct semaphore_info* DRD_(semaphore_init)(const Addr semaphore,
    }
    else
    {
+#if defined(VGO_darwin)
+      const ThreadId vg_tid = VG_(get_running_tid)();
+      GenericErrInfo GEI = { DRD_(thread_get_running_tid)() };
+      VG_(maybe_record_error)(vg_tid,
+                             GenericErr,
+                             VG_(get_IP)(vg_tid),
+                             "sem_init() is not yet supported on Darwin",
+                             &GEI);
+      return NULL;
+#else
       p = drd_semaphore_get_or_allocate(semaphore);
+#endif
    }
    tl_assert(p);
    p->waits_to_skip = value;