[PATCH] fio: pretty close to compiling/working on FreeBSD now
[disktools.git] / os-linux.h
CommitLineData
fa78facd
JA
1#ifndef FIO_OS_LINUX_H
2#define FIO_OS_LINUX_H
3
f5087211
JA
4#define FIO_HAVE_LIBAIO
5#define FIO_HAVE_POSIXAIO
6#define FIO_HAVE_FADVISE
a984b9e5 7#define FIO_HAVE_CPU_AFFINITY
35deef72 8#define FIO_HAVE_DISK_UTIL
a984b9e5
JA
9
10#define OS_MAP_ANON (MAP_ANONYMOUS)
11
12typedef cpu_set_t os_cpu_mask_t;
fa78facd
JA
13
14/*
15 * we want fadvise64 really, but it's so tangled... later
16 */
a984b9e5
JA
17#define fadvise(fd, off, len, advice) \
18 posix_fadvise((fd), (off_t)(off), (len), (advice))
19
20#define fio_setaffinity(td) \
21 sched_setaffinity((td)->pid, sizeof((td)->cpumask), &(td)->cpumask)
35deef72
JA
22#define fio_getaffinity(pid, ptr) \
23 sched_getaffinity((pid), sizeof(cpu_set_t), (ptr))
fa78facd
JA
24
25#endif