summaryrefslogtreecommitdiff
path: root/os/os-freebsd.h
diff options
context:
space:
mode:
authorBruce Cran <bruce@cran.org.uk>2011-01-04 10:59:30 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-01-04 10:59:30 +0100
commitecc314ba7c5f02b7e90ac1dfbce1a74cd4e6d6fe (patch)
tree6ffdc338398b8426022d7e32a185db4ffb41d58f /os/os-freebsd.h
parent03e20d687566753b90383571e5e152c5142bdffd (diff)
downloadfio-ecc314ba7c5f02b7e90ac1dfbce1a74cd4e6d6fe.tar.gz
fio-ecc314ba7c5f02b7e90ac1dfbce1a74cd4e6d6fe.tar.bz2
FIO Windows update
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'os/os-freebsd.h')
-rw-r--r--os/os-freebsd.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/os/os-freebsd.h b/os/os-freebsd.h
index 4a50a3cf..0cb7ae5e 100644
--- a/os/os-freebsd.h
+++ b/os/os-freebsd.h
@@ -7,18 +7,21 @@
#define FIO_HAVE_POSIXAIO
#define FIO_HAVE_ODIRECT
+#define FIO_HAVE_IOPRIO
+#define FIO_HAVE_STRSEP
#define FIO_USE_GENERIC_RAND
#define FIO_HAVE_CHARDEV_SIZE
+#define FIO_HAVE_CLOCK_MONOTONIC
#define OS_MAP_ANON MAP_ANON
typedef off_t off64_t;
-static inline int blockdev_size(int fd, unsigned long long *bytes)
+static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)
{
off_t size;
- if (!ioctl(fd, DIOCGMEDIASIZE, &size)) {
+ if (!ioctl(f->fd, DIOCGMEDIASIZE, &size)) {
*bytes = size;
return 0;
}
@@ -27,12 +30,12 @@ static inline int blockdev_size(int fd, unsigned long long *bytes)
return errno;
}
-static inline int chardev_size(int fd, unsigned long long *bytes)
+static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)
{
- return blockdev_size(fd, bytes);
+ return blockdev_size(f->fd, bytes);
}
-static inline int blockdev_invalidate_cache(int fd)
+static inline int blockdev_invalidate_cache(struct fio_file *f)
{
return EINVAL;
}