From 0e88cde1985ece72010e903435f2cecec8403936 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 23 Jul 2009 17:52:51 +0000 Subject: [PATCH] Print an error message if sem_init() is called by a client program on Darwin. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10565 --- drd/drd_semaphore.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drd/drd_semaphore.c b/drd/drd_semaphore.c index f2e38e2f4f..e064310b32 100644 --- a/drd/drd_semaphore.c +++ b/drd/drd_semaphore.c @@ -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; -- 2.47.3