support SA_RESTART flag and restart syscall

This commit is contained in:
Tomoki Shirasawa
2015-07-16 16:33:14 +09:00
parent 1bc84d3feb
commit 1ff4cf68c2
5 changed files with 85 additions and 22 deletions

View File

@@ -171,7 +171,7 @@ static struct ihk_mc_interrupt_handler query_free_mem_handler = {
};
void set_signal(int sig, void *regs, struct siginfo *info);
void check_signal(unsigned long rc, void *regs);
void check_signal(unsigned long, void *, int);
int gencore(struct process *, void *, struct coretable **, int *);
void freecore(struct coretable **);
@@ -416,7 +416,7 @@ static void page_fault_handler(void *fault_addr, uint64_t reason, void *regs)
info._sifields._sigfault.si_addr = fault_addr;
set_signal(SIGSEGV, regs, &info);
}
check_signal(0, regs);
check_signal(0, regs, 0);
goto out;
}

View File

@@ -94,7 +94,7 @@ static char *syscall_name[] MCKERNEL_UNUSED = {
#undef SYSCALL_DELEGATED
};
void check_signal(unsigned long rc, void *regs);
void check_signal(unsigned long, void *, int);
void do_signal(long rc, void *regs, struct process *proc, struct sig_pending *pending);
extern unsigned long do_kill(int pid, int tid, int sig, struct siginfo *info, int ptracecont);
extern struct sigpending *hassigpending(struct process *proc);
@@ -6059,7 +6059,7 @@ long syscall(int num, ihk_mc_user_context_t *ctx)
l = syscall_generic_forwarding(num, ctx);
}
check_signal(l, NULL);
check_signal(l, NULL, num);
check_need_resched();
if (cpu_local_var(current)->ftn->ptrace) {