1 #ifndef FIO_OS_NETBSD_H
2 #define FIO_OS_NETBSD_H
6 /* XXX hack to avoid confilcts between rbtree.h and <sys/rb.h> */
7 #define rb_node _rb_node
8 #include <sys/sysctl.h>
15 #define FIO_HAVE_POSIXAIO
16 #define FIO_HAVE_FADVISE
17 #define FIO_HAVE_ODIRECT
18 #define FIO_HAVE_STRSEP
19 #define FIO_HAVE_FDATASYNC
20 #define FIO_USE_GENERIC_BDEV_SIZE
21 #define FIO_USE_GENERIC_RAND
23 #undef FIO_HAVE_CPU_AFFINITY /* XXX notyet */
25 #define OS_MAP_ANON MAP_ANON
27 #ifndef PTHREAD_STACK_MIN
28 #define PTHREAD_STACK_MIN 4096
31 typedef off_t off64_t;
33 static inline int blockdev_invalidate_cache(struct fio_file *f)
38 static inline unsigned long long os_phys_mem(void)
40 int mib[2] = { CTL_HW, HW_PHYSMEM64 };
42 size_t len = sizeof(mem);
44 sysctl(mib, 2, &mem, &len, NULL, 0);
49 #define FIO_MADV_FREE MADV_FREE
52 /* XXX NetBSD doesn't have getopt_long_only */
53 #define getopt_long_only getopt_long