[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/34] linux-user: Support for restarting system cal
From: |
Timothy E Baldwin |
Subject: |
[Qemu-devel] [PATCH 06/34] linux-user: Support for restarting system calls for MIPS targets |
Date: |
Sun, 6 Sep 2015 00:57:00 +0100 |
Signed-off-by: Timothy Edward Baldwin <address@hidden>
---
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
- [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 01/34] linux-user: Fix array bounds in errno conversion, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 04/34] linux-user: Support for restarting system calls for x86 targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 06/34] linux-user: Support for restarting system calls for MIPS targets,
Timothy E Baldwin <=
- [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 19/34] linux-user: Restart fork() if signals pending, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 15/34] linux-user: Remove redundant get_errno() calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 17/34] linux-user: Use safe_syscall for wait system calls, Timothy E Baldwin, 2015/09/05