Commit | Line | Data |
---|---|---|
ebac4655 JA |
1 | #ifndef FIO_OS_FREEBSD_H |
2 | #define FIO_OS_FREEBSD_H | |
3 | ||
4 | #undef FIO_HAVE_LIBAIO | |
5 | #define FIO_HAVE_POSIXAIO | |
6 | #undef FIO_HAVE_FADVISE | |
7 | #undef FIO_HAVE_CPU_AFFINITY | |
8 | #undef FIO_HAVE_DISK_UTIL | |
9 | #undef FIO_HAVE_SGIO | |
10 | ||
11 | #define OS_MAP_ANON (MAP_ANON) | |
12 | ||
13 | typedef unsigned long os_cpu_mask_t; | |
14 | ||
15 | /* | |
16 | * FIXME | |
17 | */ | |
9104f874 | 18 | static inline int blockdev_size(int fd, unsigned long long *bytes) |
ebac4655 JA |
19 | { |
20 | return 1; | |
21 | } | |
22 | ||
32cd46a0 JA |
23 | static inline unsigned long long os_phys_mem(void) |
24 | { | |
25 | int mib[2] = { CTL_HW, HW_PHYSMEM }; | |
26 | unsigned long long mem; | |
27 | size_t len = sizeof(mem); | |
28 | ||
29 | sysctl(mib, 2, &mem, &len, NULL, 0); | |
30 | return mem; | |
31 | } | |
32 | ||
ebac4655 | 33 | #endif |