Remove comment wrt sigaction() usage, it's deprecated
[fio.git] / os / os-solaris.h
CommitLineData
2c0ecd28
JA
1#ifndef FIO_OS_SOLARIS_H
2#define FIO_OS_SOLARIS_H
3
4#undef FIO_HAVE_LIBAIO
5#define FIO_HAVE_POSIXAIO
417f0068 6#define FIO_HAVE_SOLARISAIO
2c0ecd28
JA
7#undef FIO_HAVE_FADVISE
8#undef FIO_HAVE_CPU_AFFINITY
9#undef FIO_HAVE_DISK_UTIL
10#undef FIO_HAVE_SGIO
11#undef FIO_HAVE_ODIRECT
fffca02d 12#define FIO_HAVE_FALLOCATE
207cb0f0 13#define FIO_HAVE_POSIXAIO_FSYNC
2c0ecd28
JA
14
15#define OS_MAP_ANON (MAP_ANON)
16
17typedef unsigned long os_cpu_mask_t;
18typedef unsigned int os_random_state_t;
19
20/*
21 * FIXME
22 */
23static inline int blockdev_size(int fd, unsigned long long *bytes)
24{
e5b401d4
JA
25 return EINVAL;
26}
27
28static inline int blockdev_invalidate_cache(int fd)
29{
30 return EINVAL;
2c0ecd28
JA
31}
32
33static inline unsigned long long os_phys_mem(void)
34{
35#if 0
36 int mib[2] = { CTL_HW, HW_PHYSMEM };
37 unsigned long long mem;
38 size_t len = sizeof(mem);
39
40 sysctl(mib, 2, &mem, &len, NULL, 0);
41 return mem;
42#else
43 return 0;
44#endif
45}
46
47static inline void os_random_seed(unsigned long seed, os_random_state_t *rs)
48{
49 srand(seed);
50}
51
52static inline long os_random_long(os_random_state_t *rs)
53{
54 long val;
55
56 val = rand_r(rs);
57 return val;
58}
59
2c0ecd28 60#endif