Add a new client request and pair of macros,
VALGRIND_{DISABLE,ENABLE}_ERROR_REPORTING, which allow a thread to
temporarily disable reporting of errors it makes.  This is useful for
making Memcheck behave sanely in the presence of some MPI
implementations.  Also mark up libmpiwrap.c accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11910 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/pub_core_threadstate.h b/coregrind/pub_core_threadstate.h
index ba9404c..31c66e3 100644
--- a/coregrind/pub_core_threadstate.h
+++ b/coregrind/pub_core_threadstate.h
@@ -340,6 +340,14 @@
    /* OS-specific thread state */
    ThreadOSstate os_state;
 
+   /* Error disablement level.  A counter which allows selectively
+      disabling error reporting in threads.  When zero, reporting is
+      enabled.  When nonzero, it is disabled.  This is controlled by
+      the client request 'VG_USERREQ__CHANGE_ERR_DISABLEMENT'.  New
+      threads are always created with this as zero (errors
+      enabled). */
+   UInt err_disablement_level;
+
    /* Per-thread jmp_buf to resume scheduler after a signal */
    Bool               sched_jmpbuf_valid;
    VG_MINIMAL_JMP_BUF(sched_jmpbuf);