Signed-off-by: Timothy Edward Baldwin <t.e.baldwi...@members.leeds.ac.uk> --- linux-user/main.c | 4 ++++ linux-user/mips/syscall.h | 2 ++ linux-user/mips64/syscall.h | 2 ++ 3 files changed, 8 insertions(+)
diff --git a/linux-user/main.c b/linux-user/main.c index 9653155..124e9cc 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2489,6 +2489,10 @@ done_syscall: env->active_tc.gpr[8], env->active_tc.gpr[9], env->active_tc.gpr[10], env->active_tc.gpr[11]); # endif /* O32 */ + if (ret == -TARGET_ERESTARTSYS) { + env->active_tc.PC -= 4; + break; + } if (ret == -TARGET_QEMU_ESIGRETURN) { /* Returning from a successful sigreturn syscall. Avoid clobbering register state. */ diff --git a/linux-user/mips/syscall.h b/linux-user/mips/syscall.h index e34f80c..cede30c 100644 --- a/linux-user/mips/syscall.h +++ b/linux-user/mips/syscall.h @@ -227,3 +227,5 @@ struct target_pt_regs { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_MLOCKALL_MCL_CURRENT 1 #define TARGET_MLOCKALL_MCL_FUTURE 2 + +#define TARGET_USE_ERESTARTSYS 1 diff --git a/linux-user/mips64/syscall.h b/linux-user/mips64/syscall.h index 33afb8d..88716c1 100644 --- a/linux-user/mips64/syscall.h +++ b/linux-user/mips64/syscall.h @@ -224,3 +224,5 @@ struct target_pt_regs { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_MLOCKALL_MCL_CURRENT 1 #define TARGET_MLOCKALL_MCL_FUTURE 2 + +#define TARGET_USE_ERESTARTSYS 1 -- 2.1.4