Exemplo n.º 1
0
Arquivo: infect.c Projeto: Snorch/criu
static inline int is_required_syscall(user_regs_struct_t *regs, pid_t pid,
		const int sys_nr, const int sys_nr_compat)
{
	const char *mode = user_regs_native(regs) ? "native" : "compat";
	int req_sysnr = user_regs_native(regs) ? sys_nr : sys_nr_compat;

	pr_debug("%d (%s) is going to execute the syscall %lu, required is %d\n",
		pid, mode, REG_SYSCALL_NR(*regs), req_sysnr);

	return (REG_SYSCALL_NR(*regs) == req_sysnr);
}
Exemplo n.º 2
0
static void inline
restart_syscall(struct pt_regs* regs)
{
    regs->dpc = regs->spc;
    regs->r5 = REG_SYSCALL_NR(regs);
}