Get rid of baseBlock. Now, when generated code is running, the guest
state pointer points directly at the ThreadState.arch.vex field, thus
updating it in place and avoiding a lot of code (and time-wasting)
which copies stuff back and forth to baseBlock.
Fix zillions of other places in the system where the current thread id
is needed. It is now passed to all needed places.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3090 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/addrcheck/ac_main.c b/addrcheck/ac_main.c
index c0bb2c8..12ae62a 100644
--- a/addrcheck/ac_main.c
+++ b/addrcheck/ac_main.c
@@ -1129,9 +1129,10 @@
/* Leak detector for this tool. We don't actually do anything, merely
run the generic leak detector with suitable parameters for this
tool. */
-static void ac_detect_memory_leaks ( void )
+static void ac_detect_memory_leaks ( ThreadId tid )
{
- MAC_(do_detect_memory_leaks) ( ac_is_valid_64k_chunk, ac_is_valid_address );
+ MAC_(do_detect_memory_leaks) (
+ tid, ac_is_valid_64k_chunk, ac_is_valid_address );
}
@@ -1193,7 +1194,7 @@
switch (arg[0]) {
case VG_USERREQ__DO_LEAK_CHECK:
- ac_detect_memory_leaks();
+ ac_detect_memory_leaks(tid);
*ret = 0; /* return value is meaningless */
break;