Cleanup of the dispatch mechanism.  Now syscall returns and the final
request to shutdown valgrind are done with the client request
mechanism too.  This is much better than having to check all
call/return addresses.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@57 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/vg_constants.h b/vg_constants.h
index b1b1b32..9fb6a23 100644
--- a/vg_constants.h
+++ b/vg_constants.h
@@ -54,14 +54,20 @@
 /* Magic values that %ebp might be set to when returning to the
    dispatcher.  The only other legitimate value is to point to the
    start of VG_(baseBlock).  These also are return values from
-   VG_(run_innerloop) to the scheduler. */
-#define VG_TRC_EBP_JMP_SPECIAL    17
-#define VG_TRC_EBP_JMP_SYSCALL    19
-#define VG_TRC_EBP_JMP_CLIENTREQ  23
+   VG_(run_innerloop) to the scheduler.
 
-#define VG_TRC_INNER_COUNTERZERO  29  /* ebp can't have this; sched return only */
-#define VG_TRC_INNER_FASTMISS     31  /* ditto.  Means fast-cache miss. */
-#define VG_TRC_UNRESUMABLE_SIGNAL 37  /* ditto; got sigsegv/sigbus */
+   EBP means %ebp can legitimately have this value when a basic block
+   returns to the dispatch loop.  TRC means that this value is a valid
+   thread return code, which the dispatch loop may return to the
+   scheduler.  */
+#define VG_TRC_EBP_JMP_STKADJ     17 /* EBP only; handled by dispatcher */
+#define VG_TRC_EBP_JMP_SYSCALL    19 /* EBP and TRC */
+#define VG_TRC_EBP_JMP_CLIENTREQ  23 /* EBP and TRC */
+
+#define VG_TRC_INNER_COUNTERZERO  29  /* TRC only; means bb ctr == 0 */
+#define VG_TRC_INNER_FASTMISS     31  /* TRC only; means fast-cache miss. */
+#define VG_TRC_UNRESUMABLE_SIGNAL 37  /* TRC only; got sigsegv/sigbus */
+
 
 /* Debugging hack for assembly code ... sigh. */
 #if 0
@@ -95,6 +101,10 @@
 #define VG_SMC_CACHE_SHIFT 6
 
 
+/* Assembly code stubs make these requests ... */
+#define VG_USERREQ__SIGNAL_RETURNS          0x4001
+#define VG_USERREQ__SHUTDOWN_VALGRIND       0x4002 
+
 #endif /* ndef __VG_INCLUDE_H */
 
 /*--------------------------------------------------------------------*/