Mesa (master): util: only use SCHED_IDLE in pthread_setschedparam() when it's defined
Roland Scheidegger
sroland at kemper.freedesktop.org
Thu Aug 31 23:24:10 UTC 2017
Module: Mesa
Branch: master
Commit: c92fe8a8c50968a6ac37cbecdd54208f0eea246c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c92fe8a8c50968a6ac37cbecdd54208f0eea246c
Author: Roland Scheidegger <sroland at vmware.com>
Date: Sat Aug 26 17:08:07 2017 +0200
util: only use SCHED_IDLE in pthread_setschedparam() when it's defined
Fixes build error when it's not.
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
---
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 49361c3dad..449da7dc9a 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.
More information about the mesa-commit
mailing list