Handle VG_USERREQ__PTHREAD_GET_THREADID and VG_USERREQ__RUNNING_ON_VALGRIND
cheaply, with the trivial-client-request mechanism.  The latter is called
once per pthread call, even simple ones like pthread_mutex_[un]lock.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@88 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/vg_clientperms.c b/vg_clientperms.c
index 081b7c6..02d0b7b 100644
--- a/vg_clientperms.c
+++ b/vg_clientperms.c
@@ -372,8 +372,12 @@
          vg_add_client_stack_block ( tst, arg[1], arg[2] );
          return 0;
 
+      /* Is handled by the scheduler as a trivial request, for
+         performance reasons. */
+      /*
       case VG_USERREQ__RUNNING_ON_VALGRIND:
          return 1;
+      */
 
       case VG_USERREQ__DO_LEAK_CHECK:
          if (!VG_(clo_instrument))