06c32a55bdc5af46e1eb095571e4ae7e5bf735ed
[disktools.git] / os-linux.h
1 #ifndef FIO_OS_LINUX_H
2 #define FIO_OS_LINUX_H
3
4 #define FIO_HAVE_LIBAIO
5 #define FIO_HAVE_POSIXAIO
6 #define FIO_HAVE_FADVISE
7 #define FIO_HAVE_CPU_AFFINITY
8
9 #define OS_MAP_ANON             (MAP_ANONYMOUS)
10
11 typedef cpu_set_t os_cpu_mask_t;
12
13 /*
14  * we want fadvise64 really, but it's so tangled... later
15  */
16 #define fadvise(fd, off, len, advice)   \
17         posix_fadvise((fd), (off_t)(off), (len), (advice))
18
19 #define fio_setaffinity(td)             \
20         sched_setaffinity((td)->pid, sizeof((td)->cpumask), &(td)->cpumask)
21
22 #endif