qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls


From: Timothy E Baldwin
Subject: [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls
Date: Sun, 6 Sep 2015 00:57:03 +0100

If DEBUG_ERESTARTSYS is set restart all system calls once.

Signed-off-by: Timothy Edward Baldwin <address@hidden>
---
 linux-user/syscall.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 04c91fb..80b8fa8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5585,6 +5585,16 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
arg1,
     struct statfs stfs;
     void *p;
 
+#if defined(DEBUG_ERESTARTSYS) && defined(TARGET_USE_ERESTARTSYS)
+    {
+        static int flag;
+        flag = !flag;
+        if (flag) {
+            return -TARGET_ERESTARTSYS;
+        }
+    }
+#endif
+
 #ifdef DEBUG
     gemu_log("syscall %d", num);
 #endif
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]