X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-linux.h;h=c45f071760affff6e435b18b3ce6cf4e33d51187;hb=bb71ecd67de0ddcc30531615a24bfa69e40d35a4;hp=d7eec0f2fd7d1bece339f9b61e723523755545ff;hpb=67bf982340d95ca98098ea050b54b4c7adb116c0;p=fio.git diff --git a/os/os-linux.h b/os/os-linux.h index d7eec0f2..c45f0717 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -15,7 +15,6 @@ #include #include #include -#include #include "binject.h" #include "../file.h" @@ -194,14 +193,6 @@ static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev) #define FIO_MADV_FREE MADV_REMOVE #endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define FIO_LITTLE_ENDIAN -#elif __BYTE_ORDER == __BIG_ENDIAN -#define FIO_BIG_ENDIAN -#else -#error "Unknown endianness" -#endif - #define fio_swap16(x) __bswap_16(x) #define fio_swap32(x) __bswap_32(x) #define fio_swap64(x) __bswap_64(x) @@ -255,4 +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