Skip to content

Commit

Permalink
Improve restarted syscalls
Browse files Browse the repository at this point in the history
This manually adds syscall restarting for ARM64, like it's done
for ARM.
  • Loading branch information
susematz authored and agraf committed Sep 5, 2013
1 parent 4a87845 commit ec9ec18
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions linux-user/main.c
Expand Up @@ -880,15 +880,24 @@ void cpu_loop(CPUARMState *env)
case EXCP_BKPT:
{
#ifdef TARGET_ARM64
env->xregs[0] = do_syscall(env,
env->xregs[8],
env->xregs[0],
env->xregs[1],
env->xregs[2],
env->xregs[3],
env->xregs[4],
env->xregs[5],
0, 0);
TaskState *ts = ((CPUArchState*)env)->opaque;
target_ulong r;
r = do_syscall(env,
env->xregs[8],
env->xregs[0],
env->xregs[1],
env->xregs[2],
env->xregs[3],
env->xregs[4],
env->xregs[5],
0, 0);
if ((r == -EINTR) && ts->signal_restart &&
syscall_restartable(env->xregs[0])) {
env->pc -= 4;
} else {
env->xregs[0] = r;
}
ts->signal_restart = 0;
#else

env->eabi = 1;
Expand Down

0 comments on commit ec9ec18

Please sign in to comment.