Enabled support for nesting mutexes and condition variables in higher-level synchronization primitives. Changed mutex tracing output slightly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8377 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c
index 62dd1d9..064804e 100644
--- a/drd/drd_pthread_intercepts.c
+++ b/drd/drd_pthread_intercepts.c
@@ -1,6 +1,6 @@
/*--------------------------------------------------------------------*/
-/*--- Client-space code for drd. drd_intercepts.c ---*/
+/*--- Client-space code for drd. drd_pthread_intercepts.c ---*/
/*--------------------------------------------------------------------*/
/*
@@ -460,6 +460,8 @@
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_INIT,
cond, 0, 0, 0, 0);
CALL_FN_W_WW(ret, fn, cond, attr);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_COND_INIT,
+ cond, 0, 0, 0, 0);
return ret;
}
@@ -471,6 +473,8 @@
int res;
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_DESTROY,
+ cond, 0, 0, 0, 0);
CALL_FN_W_W(ret, fn, cond);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_COND_DESTROY,
cond, 0, 0, 0, 0);
@@ -523,6 +527,8 @@
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_SIGNAL,
cond, 0, 0, 0, 0);
CALL_FN_W_W(ret, fn, cond);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_COND_SIGNAL,
+ cond, 0, 0, 0, 0);
return ret;
}
@@ -537,6 +543,8 @@
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_BROADCAST,
cond, 0, 0, 0, 0);
CALL_FN_W_W(ret, fn, cond);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_COND_BROADCAST,
+ cond, 0, 0, 0, 0);
return ret;
}