Commit | Line | Data |
---|---|---|
fa78facd JA |
1 | #ifndef FIO_OS_H |
2 | #define FIO_OS_H | |
3 | ||
4 | #if defined(__linux__) | |
5 | #include "os-linux.h" | |
35deef72 JA |
6 | #elif defined(__FreeBSD__) |
7 | #include "os-freebsd.h" | |
fa78facd JA |
8 | #else |
9 | #error "unsupported os" | |
10 | #endif | |
11 | ||
a984b9e5 JA |
12 | #ifdef FIO_HAVE_LIBAIO |
13 | #include <libaio.h> | |
14 | #endif | |
15 | ||
16 | #ifdef FIO_HAVE_POSIXAIO | |
17 | #include <aio.h> | |
18 | #endif | |
19 | ||
fa78facd | 20 | #ifndef FIO_HAVE_FADVISE |
35deef72 | 21 | #define fadvise(fd, off, len, advice) (0) |
fa78facd JA |
22 | |
23 | #define POSIX_FADV_DONTNEED (0) | |
24 | #define POSIX_FADV_SEQUENTIAL (0) | |
25 | #define POSIX_FADV_RANDOM (0) | |
26 | #endif /* FIO_HAVE_FADVISE */ | |
27 | ||
a984b9e5 | 28 | #ifndef FIO_HAVE_CPU_AFFINITY |
35deef72 JA |
29 | #define fio_setaffinity(td) (0) |
30 | #define fio_getaffinity(pid, mask) (0) | |
a984b9e5 JA |
31 | #endif |
32 | ||
f5087211 JA |
33 | struct thread_data; |
34 | extern int fio_libaio_init(struct thread_data *); | |
35 | extern void fio_libaio_cleanup(struct thread_data *); | |
36 | extern int fio_posixaio_init(struct thread_data *); | |
37 | extern void fio_posixaio_cleanup(struct thread_data *); | |
38 | ||
fa78facd | 39 | #endif |