#define fio_setaffinity(td) \
sched_setaffinity((td)->pid, sizeof((td)->o.cpumask), &(td)->o.cpumask)
#define fio_getaffinity(pid, ptr) \
sched_getaffinity((pid), sizeof(cpu_set_t), (ptr))
#define fio_setaffinity(td) \
sched_setaffinity((td)->pid, sizeof((td)->o.cpumask), &(td)->o.cpumask)
#define fio_getaffinity(pid, ptr) \
sched_getaffinity((pid), sizeof(cpu_set_t), (ptr))