qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]