From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0uiY-0005xU-At for qemu-devel@nongnu.org; Thu, 12 May 2016 13:48:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0uiS-0002k6-WD for qemu-devel@nongnu.org; Thu, 12 May 2016 13:48:09 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:56927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0uiS-0002iY-QF for qemu-devel@nongnu.org; Thu, 12 May 2016 13:48:04 -0400 From: Peter Maydell Date: Thu, 12 May 2016 18:47:28 +0100 Message-Id: <1463075272-9933-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1463075272-9933-1-git-send-email-peter.maydell@linaro.org> References: <1463075272-9933-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v2 04/28] linux-user: Define TARGET_ERESTART* errno values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org, Timothy Edward Baldwin , Riku Voipio , Richard Henderson From: Timothy E Baldwin 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 [PMM: split out from the patch which moves and renumbers TARGET_QEMU_ESIGRETURN, add comment on usage] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/errno_defs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index 8a1cf76..b7a8c9f 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) */ -- 1.9.1