X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-linux.h;h=dd9c5aaf493ce6ff403e5b1ec92c5390d7b82bb1;hp=b766cbf9503af73a144e5cddf1f542ed8e13e3b4;hb=e8462bd8250cf3ff2d41f17e1a4d4cefc70b6b37;hpb=8f933caebc879fa06bb8d2d25802dd6f27da8071;ds=sidebyside diff --git a/os/os-linux.h b/os/os-linux.h index b766cbf9..dd9c5aaf 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -55,13 +55,13 @@ typedef struct drand48_data os_random_state_t; * the affinity helpers to work. */ #ifndef GLIBC_2_3_2 -#define fio_setaffinity(td) \ - sched_setaffinity((td)->pid, sizeof((td)->o.cpumask), &(td)->o.cpumask) +#define fio_setaffinity(pid, cpumask) \ + sched_setaffinity((pid), sizeof(cpumask), &(cpumask)) #define fio_getaffinity(pid, ptr) \ sched_getaffinity((pid), sizeof(cpu_set_t), (ptr)) #else -#define fio_setaffinity(td) \ - sched_setaffinity((td)->pid, &(td)->o.cpumask) +#define fio_setaffinity(pid, cpumask) \ + sched_setaffinity((pid), &(cpumask)) #define fio_getaffinity(pid, ptr) \ sched_getaffinity((pid), (ptr)) #endif