[Mesa-dev] [PATCH] util: only use SCHED_IDLE in pthread_setschedparam() when it's defined

Jose Fonseca jfonseca at vmware.com
Sat Aug 26 15:11:41 UTC 2017


On 26/08/17 16:09, sroland at vmware.com wrote:
> From: Roland Scheidegger <sroland at vmware.com>
> 
> Fixes build error when it's not.
> ---
>   src/util/u_queue.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/util/u_queue.c b/src/util/u_queue.c
> index 49361c3..449da7d 100644
> --- a/src/util/u_queue.c
> +++ b/src/util/u_queue.c
> @@ -246,7 +246,7 @@ util_queue_init(struct util_queue *queue,
>         }
>   
>         if (flags & UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY) {
> -   #if defined(__linux__)
> +   #if defined(__linux__) && defined(SCHED_IDLE)
>            struct sched_param sched_param = {0};
>   
>            /* The nice() function can only set a maximum of 19.
> 

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>


More information about the mesa-dev mailing list