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

Rémi Bernon rbernon at codeweavers.com
Wed Jul 3 08:13:59 CDT 2019


On Wed, 2019-07-03 at 18:03 +0800, Dmitry Timoshkov wrote:
> 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.

> > +    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.
-- 
Rémi Bernon <rbernon at codeweavers.com>




More information about the wine-devel mailing list