From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HNa-0007Em-1t for qemu-devel@nongnu.org; Fri, 27 May 2016 09:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6HNX-00015m-VW for qemu-devel@nongnu.org; Fri, 27 May 2016 09:00:41 -0400 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:35257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6HNX-00015a-Gl for qemu-devel@nongnu.org; Fri, 27 May 2016 09:00:39 -0400 Received: by mail-lf0-x236.google.com with SMTP id w16so33405801lfd.2 for ; Fri, 27 May 2016 06:00:39 -0700 (PDT) From: riku.voipio@linaro.org Date: Fri, 27 May 2016 15:59:55 +0300 Message-Id: <14896d32814c78ed5b97a22fbd9e5a6cddc2de80.1464353863.git.riku.voipio@linaro.org> In-Reply-To: References: Subject: [Qemu-devel] [PULL v2 04/38] 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: Timothy E Baldwin 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 Signed-off-by: Riku Voipio --- 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) */ -- 2.1.4