On 6 September 2015 at 00:56, Timothy E Baldwin
<t.e.baldwi...@members.leeds.ac.uk> 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 <t.e.baldwi...@members.leeds.ac.uk>
> ---
>  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 <peter.mayd...@linaro.org>

thanks
-- PMM

Reply via email to