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
13 #define OS_MAP_ANON (MAP_ANONYMOUS)
15 typedef cpu_set_t os_cpu_mask_t;
18 * we want fadvise64 really, but it's so tangled... later
20 #define fadvise(fd, off, len, advice) \
21 posix_fadvise((fd), (off_t)(off), (len), (advice))
23 #define fio_setaffinity(td) \
24 sched_setaffinity((td)->pid, sizeof((td)->cpumask), &(td)->cpumask)
25 #define fio_getaffinity(pid, ptr) \
26 sched_getaffinity((pid), sizeof(cpu_set_t), (ptr))
28 static inline int ioprio_set(int which, int who, int ioprio)
30 return syscall(__NR_ioprio_set, which, who, ioprio);
34 IOPRIO_WHO_PROCESS = 1,
39 #define IOPRIO_CLASS_SHIFT 13
42 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
45 static inline int blockdev_size(int fd, size_t *bytes)
47 if (!ioctl(fd, BLKGETSIZE64, bytes))