X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos.h;h=03d1e9a14565f8481dd93db480e1896dfde184ec;hb=002fe73409d1e3d5e7dfe2885f75885bfaf506bc;hp=1e924d3360b423201cab1cfce1288864d8559c5e;hpb=135be493d843d4cae2966a35cbd22a3058ec8e4b;p=fio.git diff --git a/os/os.h b/os/os.h index 1e924d33..03d1e9a1 100644 --- a/os/os.h +++ b/os/os.h @@ -17,6 +17,7 @@ enum { os_hpux, os_mac, os_netbsd, + os_openbsd, os_solaris, os_windows, os_android, @@ -30,6 +31,8 @@ enum { #include "os-linux.h" #elif defined(__FreeBSD__) #include "os-freebsd.h" +#elif defined(__OpenBSD__) +#include "os-openbsd.h" #elif defined(__NetBSD__) #include "os-netbsd.h" #elif defined(__sun__) @@ -90,6 +93,12 @@ typedef unsigned long os_cpu_mask_t; #define OS_O_DIRECT O_DIRECT #endif +#ifdef OS_O_ATOMIC +#define FIO_O_ATOMIC OS_O_ATOMIC +#else +#define FIO_O_ATOMIC 0 +#endif + #ifndef FIO_HAVE_HUGETLB #define SHM_HUGETLB 0 #define MAP_HUGETLB 0 @@ -127,7 +136,11 @@ typedef unsigned long os_cpu_mask_t; #endif #ifndef FIO_PREFERRED_CLOCK_SOURCE +#ifdef CONFIG_CLOCK_GETTIME #define FIO_PREFERRED_CLOCK_SOURCE CS_CGETTIME +#else +#define FIO_PREFERRED_CLOCK_SOURCE CS_GTOD +#endif #endif #ifndef FIO_MAX_JOBS @@ -210,12 +223,13 @@ static inline uint64_t fio_swap64(uint64_t val) }) #ifndef FIO_HAVE_BLKTRACE -static inline int is_blktrace(const char *fname) +static inline int is_blktrace(const char *fname, int *need_swap) { return 0; } struct thread_data; -static inline int load_blktrace(struct thread_data *td, const char *fname) +static inline int load_blktrace(struct thread_data *td, const char *fname, + int need_swap) { return 1; }