1 #ifndef FIO_OS_SOLARIS_H
2 #define FIO_OS_SOLARIS_H
7 #define FIO_HAVE_POSIXAIO
8 #define FIO_HAVE_SOLARISAIO
9 #define FIO_HAVE_FALLOCATE
10 #define FIO_HAVE_POSIXAIO_FSYNC
12 #define OS_MAP_ANON (MAP_ANON)
14 struct solaris_rand_seed {
18 typedef unsigned long os_cpu_mask_t;
19 typedef struct solaris_rand_seed os_random_state_t;
24 static inline int blockdev_size(int fd, unsigned long long *bytes)
29 static inline int blockdev_invalidate_cache(int fd)
34 static inline unsigned long long os_phys_mem(void)
39 static inline void os_random_seed(unsigned long seed, os_random_state_t *rs)
41 rs->r[0] = seed & 0xffff;
43 rs->r[1] = seed & 0xffff;
45 rs->r[2] = seed & 0xffff;
49 static inline long os_random_long(os_random_state_t *rs)
51 return nrand48(rs->r);
54 #define FIO_OS_DIRECTIO
55 extern int directio(int, int);
56 static inline int fio_set_odirect(int fd)
58 if (directio(fd, DIRECTIO_ON) < 0)