linux-lts-quantal-3.5.0/kernel/replay.c
/* These functions check the clock condition before and after a syscall, respectively.  We have to do this for syscalls for which
   Pin holds a lock throughout to avoid a deadlock. */
These functions check the clock condition before and after a syscall, respectively.  We have to do this for syscalls for which
Pin holds a lock throughout to avoid a deadlock.
These functions check the clock condition before and after a syscall respectively . We have to do this for syscalls for which Pin holds a lock throughout to avoid a deadlock .
long check_clock_before_syscall (int syscall)
{
	struct replay_thread* prt = current->replay_thrd;
	int ignore_flag;
	DPRINT ("Pid %d pre-wait for syscall %d\n", current->pid, syscall);
	if (prt->rp_record_thread->rp_ignore_flag_addr) {
		get_user (ignore_flag, prt->rp_record_thread->rp_ignore_flag_addr);
	} else {
		ignore_flag = 0;
	}
	if (!ignore_flag) {						
		prt->rp_saved_rc = get_next_syscall_enter (prt, prt->rp_group, syscall, &prt->rp_saved_retparams, &prt->rp_saved_psr);
		if (syscall == 190) {
			prt->is_pin_vfork = 1;
		}
	}
	return 0;
}
long check_clock_before_syscall ( int syscall ) { struct replay_thread * prt = current -> replay_thrd ; int ignore_flag ; DPRINT ( " \n " , current -> pid , syscall ) ; if ( prt -> rp_record_thread -> rp_ignore_flag_addr ) { get_user ( ignore_flag , prt -> rp_record_thread -> rp_ignore_flag_addr ) ; } else { ignore_flag = 0 ; } if ( ! ignore_flag ) { prt -> rp_saved_rc = get_next_syscall_enter ( prt , prt -> rp_group , syscall , & prt -> rp_saved_retparams , & prt -> rp_saved_psr ) ; if ( syscall == 190 ) { prt -> is_pin_vfork = 1 ; } } return 0 ; }
These functions check the clock condition before and after a syscall, respectively.
These functions check the clock condition before and after a syscall respectively .
// This should block until it is time to execute the syscall.  We must save the returned values for use in the actual system call // Pin calls clone instead of vfork and enforces the vfork semantics at // the Pin layer, we need to know this so that we can call replay_clone // in place of the vfork