From: Bart Van Assche Date: Sat, 6 Jun 2009 09:28:28 +0000 (+0000) Subject: Disabled libgomp intercepts. Since libgomp support was added to DRD, the X-Git-Tag: svn/VALGRIND_3_5_0~528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f60b7c79e021f8f04ee78beff6516d66c8e6a2c;p=thirdparty%2Fvalgrind.git Disabled libgomp intercepts. Since libgomp support was added to DRD, the libgomp ABI has changed. Two new functions have been added, namely gomp_team_barrier_wait() and gomp_team_barrier_wake(). The simplest way to support all libgomp functions is by disabling the libgomp intercepts. This fixes bug #195169. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10261 --- diff --git a/drd/drd_gomp_intercepts.c b/drd/drd_gomp_intercepts.c index 6cf2890b73..89aa541607 100644 --- a/drd/drd_gomp_intercepts.c +++ b/drd/drd_gomp_intercepts.c @@ -59,6 +59,8 @@ typedef void* gomp_barrier_t; // Function definitions. +#if 0 + GOMP_FUNC(void, gompZubarrierZuinit, // gomp_barrier_init gomp_barrier_t* barrier, unsigned count) { @@ -115,3 +117,5 @@ GOMP_FUNC(void, gompZubarrierZuwait, // gomp_barrier_wait VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_BARRIER_WAIT, barrier, gomp_barrier, 1, 0, 0); } + +#endif diff --git a/drd/drd_semaphore.c b/drd/drd_semaphore.c index 3a735e944d..0dac3492d8 100644 --- a/drd/drd_semaphore.c +++ b/drd/drd_semaphore.c @@ -299,14 +299,15 @@ void DRD_(semaphore_post_wait)(const DrdThreadId tid, const Addr semaphore, tl_assert(sg); if (sg) { + DRD_(thread_new_segment)(tid); + s_semaphore_segment_creation_count++; + if (p->last_sem_post_tid != tid && p->last_sem_post_tid != DRD_INVALID_THREADID) { DRD_(thread_combine_vc2)(tid, &sg->vc); } DRD_(sg_put)(sg); - DRD_(thread_new_segment)(tid); - s_semaphore_segment_creation_count++; } } } @@ -331,11 +332,11 @@ void DRD_(semaphore_pre_post)(const DrdThreadId tid, const Addr semaphore) } p->last_sem_post_tid = tid; - DRD_(thread_new_segment)(tid); sg = 0; DRD_(thread_get_latest_segment)(&sg, tid); tl_assert(sg); DRD_(segment_push)(p, sg); + DRD_(thread_new_segment)(tid); s_semaphore_segment_creation_count++; }