summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorTimothy E Baldwin2016-05-12 19:47:28 +0200
committerRiku Voipio2016-05-27 13:49:49 +0200
commit14896d32814c78ed5b97a22fbd9e5a6cddc2de80 (patch)
treee3fc7fa8d07f2b20b1aaf058f3859120725197fb /linux-user
parentlinux-user: Reindent signal handling (diff)
downloadqemu-14896d32814c78ed5b97a22fbd9e5a6cddc2de80.tar.gz
qemu-14896d32814c78ed5b97a22fbd9e5a6cddc2de80.tar.xz
qemu-14896d32814c78ed5b97a22fbd9e5a6cddc2de80.zip
linux-user: Define TARGET_ERESTART* errno values
Define TARGET_ERESTARTSYS; like the kernel, we will use this to indicate that a guest system call should be restarted. We use the same value the kernel does for this, 512. Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk> [PMM: split out from the patch which moves and renumbers TARGET_QEMU_ESIGRETURN, add comment on usage] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/errno_defs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h
index 8a1cf76cdb..b7a8c9ff95 100644
--- a/linux-user/errno_defs.h
+++ b/linux-user/errno_defs.h
@@ -139,3 +139,11 @@
/* for robust mutexes */
#define TARGET_EOWNERDEAD 130 /* Owner died */
#define TARGET_ENOTRECOVERABLE 131 /* State not recoverable */
+
+/* QEMU internal, not visible to the guest. This is returned when a
+ * system call should be restarted, to tell the main loop that it
+ * should wind the guest PC backwards so it will re-execute the syscall
+ * after handling any pending signals. They match with the ones the guest
+ * kernel uses for the same purpose.
+ */
+#define TARGET_ERESTARTSYS 512 /* Restart system call (if SA_RESTART) */