]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove useless parameters to TL_(pre_syscall)() and TL_(post_syscall)().
authorNicholas Nethercote <njn@valgrind.org>
Mon, 22 Nov 2004 19:57:39 +0000 (19:57 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 22 Nov 2004 19:57:39 +0000 (19:57 +0000)
Also remove Memcheck's and Addrcheck's use of syscall_wrappers,
since they didn't do anything useful.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3064

addrcheck/ac_main.c
coregrind/core.h
coregrind/toolfuncs.def
coregrind/vg_scheduler.c
coregrind/vg_syscalls.c
memcheck/mac_needs.c
memcheck/mc_main.c

index df104cdc70aaee28d2d85974cc6d69c751c6553b..ff5a07441ab7d81493a0442719c5e7f282072d95 100644 (file)
@@ -1265,7 +1265,6 @@ void TL_(pre_clo_init)(void)
    VG_(needs_libc_freeres)        ();
    VG_(needs_command_line_options)();
    VG_(needs_client_requests)     ();
-   VG_(needs_syscall_wrapper)     ();
    VG_(needs_sanity_checks)       ();
    VG_(needs_shadow_memory)       ();
 
index 31dab7ed0bf5aa320c727c1decbe4a041ef0506d..5c1fa98efac97773b8e5693e0ce26e3945de0385 100644 (file)
@@ -756,9 +756,6 @@ typedef struct ProxyLWP ProxyLWP;
    void**   joiner_thread_return;
    ThreadId joiner_jee_tid;      
 
-   /* If VgTs_WaitSys, this is the result of the pre-syscall check */
-   void *sys_pre_res;
-
    /* If VgTs_WaitSys, this is the syscall we're currently running */
    Int syscallno;
 
index e6945afc05b641fc7ba9b66269e371b60b76a729..359eb520b5f7f7c8fd86339f2719640aa6912ffc 100644 (file)
@@ -136,8 +136,8 @@ Bool, handle_client_request, ThreadId tid, UWord* arg_block, UWord* ret
 ## If either of the pre_ functions malloc() something to return, the
 ## corresponding post_ function had better free() it!
 
-void *, pre_syscall, ThreadId tid, UInt syscallno, Bool is_blocking
-void, post_syscall, ThreadId tid, UInt syscallno, void* pre_result, Int res, Bool is_blocking
+void,  pre_syscall, ThreadId tid, UInt syscallno
+void, post_syscall, ThreadId tid, UInt syscallno, Int res
 
 
 ## ---------------------------------------------------------------------
index f5d74751a4b2f2f6cebbd2f254a60b04d6f7aef4..8a2f1bdcd1543b3506f4c2176f2ca10ec56c0a84 100644 (file)
@@ -388,7 +388,6 @@ void mostly_clear_thread_record ( ThreadId tid )
 
    VG_(threads)[tid].syscallno           = -1;
    VG_(threads)[tid].sys_flags           = 0;
-   VG_(threads)[tid].sys_pre_res         = NULL;
 
    VG_(threads)[tid].proxy               = NULL;
 
index 36ab5956a89743a51922fd10655a9b0f3fd0b605..a45e783e3d7a2706050743d7742e8edde8478610 100644 (file)
@@ -5794,7 +5794,7 @@ Bool VG_(pre_syscall) ( ThreadId tid )
    /* Do any pre-syscall actions */
    if (VG_(needs).syscall_wrapper) {
       VGP_PUSHCC(VgpToolSysWrap);
-      tst->sys_pre_res = TL_(pre_syscall)(tid, syscallno, mayBlock);
+      TL_(pre_syscall)(tid, syscallno);
       VGP_POPCC(VgpToolSysWrap);
    }
 
@@ -5868,7 +5868,6 @@ void VG_(post_syscall) ( ThreadId tid, Bool restart )
    const struct SyscallTableEntry *sys;
    Bool isSpecial = False;
    Bool restarted = False;
-   void *pre_res;
 
    VGP_PUSHCC(VgpCoreSysWrap);
 
@@ -5879,7 +5878,6 @@ void VG_(post_syscall) ( ThreadId tid, Bool restart )
    SET_SYSCALL_RETVAL(tst->tid, res);
 
    syscallno = tst->syscallno;
-   pre_res = tst->sys_pre_res;
 
    vg_assert(syscallno != -1);                 /* must be a current syscall */
 
@@ -5927,7 +5925,7 @@ void VG_(post_syscall) ( ThreadId tid, Bool restart )
        */
       if (VG_(needs).syscall_wrapper) {
         VGP_PUSHCC(VgpToolSysWrap);
-        TL_(post_syscall)(tid, syscallno, pre_res, res, /*isBlocking*/True); // did block
+        TL_(post_syscall)(tid, syscallno, res);
         VGP_POPCC(VgpToolSysWrap);
       }
    }
index d6d431d9174d3e874830dcb957c7b4ae4865a8b9..561bb87f497b500940c656ebade69cfcf278da18 100644 (file)
@@ -937,31 +937,6 @@ Bool MAC_(handle_common_client_requests)(ThreadId tid, UWord* arg, UWord* ret )
    }
 }
 
-/*------------------------------------------------------------*/
-/*--- Syscall wrappers                                     ---*/
-/*------------------------------------------------------------*/
-
-void* TL_(pre_syscall)  ( ThreadId tid, UInt syscallno, Bool isBlocking )
-{
-   Int sane = TL_(cheap_sanity_check)();
-   return (void*)sane;
-}
-
-void  TL_(post_syscall) ( ThreadId tid, UInt syscallno,
-                           void* pre_result, Int res, Bool isBlocking )
-{
-   Int  sane_before_call = (Int)pre_result;
-   Bool sane_after_call  = TL_(cheap_sanity_check)();
-
-   if ((Int)sane_before_call && (!sane_after_call)) {
-      VG_(message)(Vg_DebugMsg, "post-syscall: ");
-      VG_(message)(Vg_DebugMsg,
-                   "probable sanity check failure for syscall number %d\n",
-                   syscallno );
-      VG_(tool_panic)("aborting due to the above ... bye!");
-   }
-}
-
 /*--------------------------------------------------------------------*/
 /*--- end                                              mac_needs.c ---*/
 /*--------------------------------------------------------------------*/
index f849875efbb12f0e1fc7fca1a8bf1af7573ddde7..7a3007536efe47efa7c9d4ef1790f8f8c356d52b 100644 (file)
@@ -1936,7 +1936,6 @@ void TL_(pre_clo_init)(void)
    VG_(needs_command_line_options)();
    VG_(needs_client_requests)     ();
    VG_(needs_extended_UCode)      ();
-   VG_(needs_syscall_wrapper)     ();
    VG_(needs_sanity_checks)       ();
    VG_(needs_shadow_memory)       ();