Received: from eggs.gnu.org ([2001:4830:134:3::10]:54213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b58rh-00042y-KL for qemu-devel@nongnu.org; Tue, 24 May 2016 05:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b58rd-0000JM-EJ for qemu-devel@nongnu.org; Tue, 24 May 2016 05:43:04 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:51566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b58rd-0000JI-40 for qemu-devel@nongnu.org; Tue, 24 May 2016 05:43:01 -0400 References: <1463075272-9933-1-git-send-email-peter.maydell@linaro.org> <1463075272-9933-5-git-send-email-peter.maydell@linaro.org> From: Laurent Vivier Message-ID: Date: Tue, 24 May 2016 11:42:44 +0200 MIME-Version: 1.0 In-Reply-To: <1463075272-9933-5-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [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: Peter Maydell , qemu-devel@nongnu.org Cc: Riku Voipio , Timothy Edward Baldwin , Richard Henderson , patches@linaro.org Le 12/05/2016 à 19:47, Peter Maydell a écrit : > 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 Reviewed-by: Laurent Vivier > --- > 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) */ >