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) ();
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;
## 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
## ---------------------------------------------------------------------
VG_(threads)[tid].syscallno = -1;
VG_(threads)[tid].sys_flags = 0;
- VG_(threads)[tid].sys_pre_res = NULL;
VG_(threads)[tid].proxy = NULL;
/* 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);
}
const struct SyscallTableEntry *sys;
Bool isSpecial = False;
Bool restarted = False;
- void *pre_res;
VGP_PUSHCC(VgpCoreSysWrap);
SET_SYSCALL_RETVAL(tst->tid, res);
syscallno = tst->syscallno;
- pre_res = tst->sys_pre_res;
vg_assert(syscallno != -1); /* must be a current syscall */
*/
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);
}
}
}
}
-/*------------------------------------------------------------*/
-/*--- 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 ---*/
/*--------------------------------------------------------------------*/
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) ();