qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] linux-user,alpha: correct select()


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH] linux-user,alpha: correct select()
Date: Tue, 8 Jan 2013 10:28:43 +0100 (CET)


Le 8 janvier 2013 à 00:14, Richard Henderson <address@hidden> a écrit :
> On 01/07/2013 02:38 PM, Laurent Vivier wrote:
> > -#if defined(TARGET_NR_select) && !defined(TARGET_S390X) && !defined(TARGET_S390)
> > +#if defined(TARGET_NR_select) && !defined(TARGET_S390X) && \
> > + !defined(TARGET_S390) && \
> > + !defined(TARGET_ALPHA)
> > case TARGET_NR_select:
> > {
> > struct target_sel_arg_struct *sel;
> > @@ -7189,8 +7191,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> > }
> > break;
> > #endif /* TARGET_NR_getdents64 */
> > -#if defined(TARGET_NR__newselect) || defined(TARGET_S390X)
> > -#ifdef TARGET_S390X
> > +#if defined(TARGET_NR__newselect) || defined(TARGET_S390X) \
> > + || defined(TARGET_ALPHA)
> > +#if defined(TARGET_S390X) || defined(TARGET_ALPHA)
> > case TARGET_NR_select:
> > #else
> > case TARGET_NR__newselect:
>
> I would much prefer to see these blocks moved around so that it's of the form
>
> #if defined(TARGET_NR_select)
> case TARGET_NR_select:
> # if defined(TARGET_ALPHA) || defined(TARGET_S390X)
> ret = do_select(arg1, arg2, arg3, arg4, arg5);
> # else
> {
> other stuff
> }
> # endif
> break;
> #endif
> #if defined(TARGET_NR__newselect)
> case TARGET_NR__newselect:
> ret = do_select(arg1, arg2, arg3, arg4, arg5);
> break;
> #endif
>
> I sincerely dislike sequences of defined and !defined that must be in sync.
> Also note that there is no TARGET_S390, only TARGET_S390X. We only emulate
> the 64-bit guest.
>
 
I agree with you, but I like to keep my patches as minimal as possible : I just add the TARGET_ALPHA on the line.
If I'm able to test the TARGET_S390X, I will try to rewrite this patch as you explain.
 
Regards,
Laurent

reply via email to

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