[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system calls |
Date: |
Thu, 10 Sep 2015 19:08:01 +0100 |
On 6 September 2015 at 00:56, Timothy E Baldwin
<address@hidden> wrote:
> This allows SA_RESTART to be supported along with various case
> where pending signals need to be handled before a system call.
>
> New macro TARGET_ERESTARTSYS which is the error code used by Linux
> to indicate that system call should be restarted.
>
> TARGET_QEMU_ESIGRETURN moved into errno_defs.h and renumbered to
> 513 which is safe from future use as a system call return value
> as it is used for system call restarting in Linux and exposed only
> via ptrace.
>
> do_sigreturn() and do_rt_sigreturn() will be amended to return
> -TARGET_QEMU_ESIGRETURN rather than the value of result register to
> avoid confusion with -TARGET_ERESTARTSYS and cpu_loop() will be
> altered to act upon the return value accordingly.
>
> Signed-off-by: Timothy Edward Baldwin <address@hidden>
> ---
> linux-user/errno_defs.h | 3 +++
> linux-user/mips/syscall.h | 4 ----
> linux-user/mips64/syscall.h | 4 ----
> linux-user/ppc/syscall.h | 2 --
> 4 files changed, 3 insertions(+), 10 deletions(-)
I feel like the commit message (especially the subject line) is
a bit askew from the actual contents of the patch, but codewise
it's OK.
> +#define TARGET_ERESTARTSYS 512 /* Restart system call */
> +#define TARGET_QEMU_ESIGRETURN 513 /* Return from signal */
I think these comments are not very useful -- they don't tell
you anything you couldn't have figured out from the constant name.
It would be better to provide a comment of a sentence or two
explaining how these are used (and also remarking that they are
not real target errnos but only visible internal to QEMU).
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-devel] [PATCH 00/34] linux-user: Fix signal race conditions and SA_RESTART, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 01/34] linux-user: Fix array bounds in errno conversion, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 04/34] linux-user: Support for restarting system calls for x86 targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 06/34] linux-user: Support for restarting system calls for MIPS targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system calls, Timothy E Baldwin, 2015/09/05
- Re: [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system calls,
Peter Maydell <=
- [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 19/34] linux-user: Restart fork() if signals pending, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 15/34] linux-user: Remove redundant get_errno() calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 17/34] linux-user: Use safe_syscall for wait system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 21/34] linux-user: Remove redundant gdb_queuesig(), Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 10/34] linux-user: Support for restarting system calls for Microblaze targets, Timothy E Baldwin, 2015/09/05