Rollup fixes for Helgrind:
* tracking of barriers: add support for resizable barriers
* resync TSan-compatible client requests with latest changes
* add direct access to the client requests used in hg_intercepts.c
* add a client request pair to disable and re-enable tracking
of arbitrary address ranges
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11062 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c
index 8c17cc7..f5dc283 100644
--- a/helgrind/hg_intercepts.c
+++ b/helgrind/hg_intercepts.c
@@ -70,8 +70,19 @@
ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args); \
ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args)
-// Do a client request. This is a macro rather than a function
-// so as to avoid having an extra function in the stack trace.
+// Do a client request. These are macros rather than a functions so
+// as to avoid having an extra frame in stack traces.
+
+// NB: these duplicate definitions in helgrind.h. But here, we
+// can have better typing (Word etc) and assertions, whereas
+// in helgrind.h we can't. Obviously it's important the two
+// sets of definitions are kept in sync.
+
+// nuke the previous definitions
+#undef DO_CREQ_v_W
+#undef DO_CREQ_v_WW
+#undef DO_CREQ_W_WW
+#undef DO_CREQ_v_WWW
#define DO_CREQ_v_W(_creqF, _ty1F,_arg1F) \
do { \
@@ -957,9 +968,10 @@
fflush(stderr);
}
- DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE,
- pthread_barrier_t*,bar,
- unsigned long,count);
+ DO_CREQ_v_WWW(_VG_USERREQ__HG_PTHREAD_BARRIER_INIT_PRE,
+ pthread_barrier_t*, bar,
+ unsigned long, count,
+ unsigned long, 0/*!resizable*/);
CALL_FN_W_WWW(ret, fn, bar,attr,count);