6 #elif defined(__FreeBSD__)
7 #include "os-freebsd.h"
9 #include "os-solaris.h"
11 #error "unsupported os"
14 #ifdef FIO_HAVE_LIBAIO
18 #ifdef FIO_HAVE_POSIXAIO
27 #ifndef FIO_HAVE_STRSEP
28 #include "../lib/strsep.h"
31 #ifndef FIO_HAVE_FADVISE
32 #define fadvise(fd, off, len, advice) (0)
34 #ifndef POSIX_FADV_DONTNEED
35 #define POSIX_FADV_DONTNEED (0)
36 #define POSIX_FADV_SEQUENTIAL (0)
37 #define POSIX_FADV_RANDOM (0)
39 #endif /* FIO_HAVE_FADVISE */
41 #ifndef FIO_HAVE_CPU_AFFINITY
42 #define fio_setaffinity(td) (0)
43 #define fio_getaffinity(pid, mask) do { } while (0)
44 #define fio_cpu_clear(mask, cpu) do { } while (0)
45 #define fio_cpuset_exit(mask) (-1)
48 #ifndef FIO_HAVE_IOPRIO
49 #define ioprio_set(which, who, prio) (0)
52 #ifndef FIO_HAVE_ODIRECT
55 #define OS_O_DIRECT O_DIRECT
58 #ifndef FIO_HAVE_HUGETLB
61 #define FIO_HUGE_PAGE 0
65 #define FIO_HUGE_PAGE 4194304
70 #define FIO_O_NOATIME 0
74 #define OS_RAND_MAX RAND_MAX
77 #ifndef FIO_HAVE_RAWBIND
78 #define fio_lookup_raw(dev, majdev, mindev) 1
81 #ifndef FIO_HAVE_BLKTRACE
82 static inline int is_blktrace(const char *fname)
87 static inline int load_blktrace(struct thread_data *td, const char *fname)
93 #define FIO_DEF_CL_SIZE 128
95 static inline int os_cache_line_size(void)
97 #ifdef FIO_HAVE_CL_SIZE
98 int ret = arch_cache_line_size();
101 return FIO_DEF_CL_SIZE;
105 return FIO_DEF_CL_SIZE;