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

Chip Davis cdavis at codeweavers.com
Thu Aug 29 10:16:58 CDT 2019


August 29, 2019 5:32 AM, "RĂ©mi Bernon" <rbernon at codeweavers.com> wrote:

> diff --git a/server/thread.c b/server/thread.c
> index e753c8d0dda..a807f19a42b 100644
> --- a/server/thread.c
> +++ b/server/thread.c
> @@ -515,28 +521,147 @@ affinity_t get_thread_affinity( struct thread *thread )
[...]
> +#ifdef HAVE_SETPRIORITY
> +        if (setpriority( PRIO_PROCESS, thread->unix_tid,
> +                         get_unix_priority( priority_class, priority ) ) == 0)
> +            return 0;
> +#endif

This may have... unexpected effects on Mac OS. The 'unix_tid' there isn't a PID at all, but a Mach port.

Chip



More information about the wine-devel mailing list