configure: add SCHED_IDLE check
[fio.git] / os / os-linux.h
index acc5a202aa80fc611bb11ed0bfa7421eaeaece6b..c45f071760affff6e435b18b3ce6cf4e33d51187 100644 (file)
@@ -35,7 +35,6 @@
 #define FIO_HAVE_TRIM
 #define FIO_HAVE_BINJECT
 #define FIO_HAVE_GETTID
-#define FIO_HAVE_SCHED_IDLE
 #define FIO_USE_GENERIC_INIT_RANDOM_STATE
 
 #ifdef MAP_HUGETLB
@@ -247,10 +246,12 @@ static inline int os_trim(int fd, unsigned long long start,
        return errno;
 }
 
+#ifdef CONFIG_SCHED_IDLE
 static inline int fio_set_sched_idle(void)
 {
        struct sched_param p = { .sched_priority = 0, };
        return sched_setscheduler(gettid(), SCHED_IDLE, &p);
 }
+#endif
 
 #endif