X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-freebsd.h;h=062c44cdc3363c5ee6436257a78530f1e08bb221;hb=c36d16f5a0b9e3d505c9933bbbdccdb519ca4faf;hp=26bb8a096790b40d4f4194b2288d1a955596f3b9;hpb=a1c58075279454a91ec43366846b93e8dcf9753c;p=fio.git diff --git a/os/os-freebsd.h b/os/os-freebsd.h index 26bb8a09..062c44cd 100644 --- a/os/os-freebsd.h +++ b/os/os-freebsd.h @@ -6,22 +6,13 @@ #define FIO_HAVE_POSIXAIO #define FIO_HAVE_ODIRECT +#define FIO_USE_GENERIC_BDEV_SIZE +#define FIO_USE_GENERIC_RAND +#define FIO_HAVE_FDATASYNC #define OS_MAP_ANON MAP_ANON typedef unsigned long os_cpu_mask_t; -typedef unsigned int os_random_state_t; - -static inline int blockdev_size(int fd, unsigned long long *bytes) -{ - off_t end = lseek(fd, 0, SEEK_END); - - if (end < 0) - return errno; - - *bytes = end; - return 0; -} static inline int blockdev_invalidate_cache(int fd) { @@ -38,19 +29,6 @@ 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