[PATCH 1/2] wineserver: Implement thread priorities on Unix with sched_setscheduler / setpriority

Dmitry Timoshkov dmitry at baikal.ru
Wed Jul 3 08:28:35 CDT 2019


RĂ©mi Bernon <rbernon at codeweavers.com> wrote:


> > > diff --git a/configure b/configure
> > > index 3b6d744c391..e89be467e2e 100755
> > > --- a/configure
> > > +++ b/configure
> > 
> > There is no need to include a diff for auto-generated file.
> 
> Alright but the file is committed and only regenerated with
> autoreconf -fi, right? I believe I had to do it manually.

Somebody else (read: Julliard) will do that for you.

> > > +    if (thread->process->priority == PROCESS_PRIOCLASS_REALTIME)
> > > +    {
> > > +#ifdef HAVE_SCHED_SETSCHEDULER
> > > +        struct sched_param param;
> > > +        if (sched_getparam( thread->unix_tid, &param ) != 0)
> > > +            goto error;
> > 
> > This 'goto' is useless.
> 
> The error handling code path currently returns 0 in order not to
> introduce any behavior change, but it should perhaps return an error
> code instead. This goto was there to indicate the error codepath is
> used in opposition to the other return 0 statements which are the
> "success" codepath. Maybe a return 0 with a comment would make it more
> clear, as for the last return 0 as well.

You are free to change 'return 0;' to a proper error handling in a patch
that actually intruduces it, until that it's purely confusing and looks
like a bad coding style.

-- 
Dmitry.



More information about the wine-devel mailing list