From: Niklas Cassel Date: Thu, 3 Feb 2022 19:28:26 +0000 (+0000) Subject: os: define min/max prio class and level for systems without ioprio X-Git-Tag: fio-3.30~71 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=971eef801cabdb52e82f0db549346f66fc331677;p=fio.git os: define min/max prio class and level for systems without ioprio In order to avoid additional ifdef FIO_HAVE_IOPRIO_CLASS/FIO_HAVE_IOPRIO from being added to the code, define IOPRIO_{MIN,MAX}_PRIO_CLASS and IOPRIO_{MIN,MAX}_PRIO_CLASS as zero for systems without support for ioprio. Signed-off-by: Niklas Cassel Link: https://lore.kernel.org/r/20220203192814.18552-7-Niklas.Cassel@wdc.com Signed-off-by: Jens Axboe --- diff --git a/os/os.h b/os/os.h index 5965d7b8..810e6166 100644 --- a/os/os.h +++ b/os/os.h @@ -119,10 +119,14 @@ extern int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu); #ifndef FIO_HAVE_IOPRIO_CLASS #define ioprio_value_is_class_rt(prio) (false) +#define IOPRIO_MIN_PRIO_CLASS 0 +#define IOPRIO_MAX_PRIO_CLASS 0 #endif #ifndef FIO_HAVE_IOPRIO #define ioprio_value(prioclass, prio) (0) #define ioprio_set(which, who, prioclass, prio) (0) +#define IOPRIO_MIN_PRIO 0 +#define IOPRIO_MAX_PRIO 0 #endif #ifndef FIO_HAVE_ODIRECT