qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system ca


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls
Date: Thu, 10 Sep 2015 19:12:00 +0100

On 6 September 2015 at 00:57, Timothy E Baldwin
<address@hidden> wrote:
> If DEBUG_ERESTARTSYS is set restart all system calls once.
>
> Signed-off-by: Timothy Edward Baldwin <address@hidden>
> ---
>  linux-user/syscall.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 04c91fb..80b8fa8 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -5585,6 +5585,16 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
> arg1,
>      struct statfs stfs;
>      void *p;
>
> +#if defined(DEBUG_ERESTARTSYS) && defined(TARGET_USE_ERESTARTSYS)
> +    {
> +        static int flag;
> +        flag = !flag;
> +        if (flag) {
> +            return -TARGET_ERESTARTSYS;
> +        }
> +    }
> +#endif

I guess this is worth retaining, but it could use a comment
about what it's for.
Also, this is an odd place in the patch series to put it; I
would have expected it either before all the patches adding
ERESTARTSYS support to each arch, or after all of them.

thanks
-- PMM



reply via email to

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