X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos.h;h=95f0ff29e02fad0b8f7ed07b1f1e451c8bbeb1ae;hp=d128f027e81c79e6bcdef2b32d75c8e5c49be74e;hb=03e20d687566753b90383571e5e152c5142bdffd;hpb=a14ca44ada0708be91ed7741a32176bef4801cc4 diff --git a/os/os.h b/os/os.h index d128f027..95f0ff29 100644 --- a/os/os.h +++ b/os/os.h @@ -2,16 +2,23 @@ #define FIO_OS_H #include +#include #include #if defined(__linux__) #include "os-linux.h" #elif defined(__FreeBSD__) #include "os-freebsd.h" +#elif defined(__NetBSD__) +#include "os-netbsd.h" #elif defined(__sun__) #include "os-solaris.h" #elif defined(__APPLE__) #include "os-mac.h" +#elif defined(_AIX) +#include "os-aix.h" +#elif defined(__CYGWIN__) +#include "os-windows.h" #else #error "unsupported os" #endif @@ -33,6 +40,10 @@ #include "../lib/strsep.h" #endif +#ifdef MSG_DONTWAIT +#define OS_MSG_DONTWAIT MSG_DONTWAIT +#endif + #ifndef FIO_HAVE_FADVISE #define fadvise(fd, off, len, advice) (0) @@ -48,6 +59,7 @@ #define fio_getaffinity(pid, mask) do { } while (0) #define fio_cpu_clear(mask, cpu) do { } while (0) #define fio_cpuset_exit(mask) (-1) +typedef unsigned long os_cpu_mask_t; #endif #ifndef FIO_HAVE_IOPRIO @@ -144,4 +156,11 @@ static inline long os_random_long(os_random_state_t *rs) } #endif +#ifndef FIO_HAVE_FS_STAT +static inline unsigned long long get_fs_size(const char *path) +{ + return 0; +} +#endif + #endif