6 #define FIO_HAVE_LIBAIO
7 #define FIO_HAVE_POSIXAIO
8 #define FIO_HAVE_FADVISE
9 #define FIO_HAVE_CPU_AFFINITY
10 #define FIO_HAVE_DISK_UTIL
12 #define FIO_HAVE_IOPRIO
14 #define OS_MAP_ANON (MAP_ANONYMOUS)
16 typedef cpu_set_t os_cpu_mask_t;
19 * we want fadvise64 really, but it's so tangled... later
21 #define fadvise(fd, off, len, advice) \
22 posix_fadvise((fd), (off_t)(off), (len), (advice))
24 #define fio_setaffinity(td) \
25 sched_setaffinity((td)->pid, sizeof((td)->cpumask), &(td)->cpumask)
26 #define fio_getaffinity(pid, ptr) \
27 sched_getaffinity((pid), sizeof(cpu_set_t), (ptr))
29 static inline int ioprio_set(int which, int who, int ioprio)
31 return syscall(__NR_ioprio_set, which, who, ioprio);
35 IOPRIO_WHO_PROCESS = 1,
40 #define IOPRIO_CLASS_SHIFT 13
43 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
46 static inline int blockdev_size(int fd, unsigned long long *bytes)
48 if (!ioctl(fd, BLKGETSIZE64, bytes))