Added support for OpenMP barriers -- if libgomp.so has been built with debug information. More in general, added support for nested synchronization constructs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7642 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-drd/drd_cond.c b/exp-drd/drd_cond.c
index 4696917..62e8089 100644
--- a/exp-drd/drd_cond.c
+++ b/exp-drd/drd_cond.c
@@ -54,12 +54,10 @@
}
static
-void cond_initialize(struct cond_info* const p, const Addr cond,
- const SizeT size)
+void cond_initialize(struct cond_info* const p, const Addr cond)
{
tl_assert(cond != 0);
tl_assert(p->a1 == cond);
- tl_assert(p->a2 - p->a1 == size);
tl_assert(p->type == ClientCondvar);
p->cleanup = (void(*)(DrdClientobj*))cond_cleanup;
@@ -90,8 +88,7 @@
}
}
-static struct cond_info*
-cond_get_or_allocate(const Addr cond, const SizeT size)
+static struct cond_info* cond_get_or_allocate(const Addr cond)
{
struct cond_info *p;
@@ -99,8 +96,8 @@
p = &clientobj_get(cond, ClientCondvar)->cond;
if (p == 0)
{
- p = &clientobj_add(cond, cond + size, ClientCondvar)->cond;
- cond_initialize(p, cond, size);
+ p = &clientobj_add(cond, ClientCondvar)->cond;
+ cond_initialize(p, cond);
}
return p;
}
@@ -112,7 +109,7 @@
}
/** Called before pthread_cond_init(). */
-void cond_pre_init(const Addr cond, const SizeT size)
+void cond_pre_init(const Addr cond)
{
struct cond_info* p;
@@ -125,8 +122,6 @@
cond);
}
- tl_assert(size > 0);
-
p = cond_get(cond);
if (p)
@@ -139,7 +134,7 @@
&cei);
}
- p = cond_get_or_allocate(cond, size);
+ p = cond_get_or_allocate(cond);
}
/** Called after pthread_cond_destroy(). */
@@ -183,7 +178,7 @@
}
/** Called before pthread_cond_wait(). */
-int cond_pre_wait(const Addr cond, const SizeT cond_size, const Addr mutex)
+int cond_pre_wait(const Addr cond, const Addr mutex)
{
struct cond_info* p;
@@ -196,7 +191,7 @@
cond);
}
- p = cond_get_or_allocate(cond, cond_size);
+ p = cond_get_or_allocate(cond);
tl_assert(p);
if (p->waiter_count == 0)