X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-freebsd.h;h=8d965aadf87ec84372f83bd07029f2e414c35992;hp=614296a4bc8744e8d4395a8abe9ef40eeb89f8d4;hb=e72fa4d40565e7a213698d8696b81f80e4670982;hpb=dc873b6f4a536c332b72cce268d5a7ccd356a891 diff --git a/os/os-freebsd.h b/os/os-freebsd.h index 614296a4..8d965aad 100644 --- a/os/os-freebsd.h +++ b/os/os-freebsd.h @@ -1,23 +1,17 @@ #ifndef FIO_OS_FREEBSD_H #define FIO_OS_FREEBSD_H +#include #include #define FIO_HAVE_POSIXAIO #define FIO_HAVE_ODIRECT +#define FIO_USE_GENERIC_BDEV_SIZE +#define FIO_USE_GENERIC_RAND #define OS_MAP_ANON MAP_ANON typedef unsigned long os_cpu_mask_t; -typedef unsigned int os_random_state_t; - -/* - * FIXME - */ -static inline int blockdev_size(int fd, unsigned long long *bytes) -{ - return EINVAL; -} static inline int blockdev_invalidate_cache(int fd) { @@ -34,17 +28,8 @@ static inline unsigned long long os_phys_mem(void) return mem; } -static inline void os_random_seed(unsigned long seed, os_random_state_t *rs) -{ - srand(seed); -} - -static inline long os_random_long(os_random_state_t *rs) -{ - long val; - - val = rand_r(rs); - return val; -} +#ifdef MADV_FREE +#define FIO_MADV_FREE MADV_FREE +#endif #endif