On 6 September 2015 at 00:57, Timothy E Baldwin
<t.e.baldwi...@members.leeds.ac.uk> wrote:
> If DEBUG_ERESTARTSYS is set restart all system calls once.
>
> Signed-off-by: Timothy Edward Baldwin <t.e.baldwi...@members.leeds.ac.uk>
> ---
>  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