X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos.h;h=4b5903471bf8a421c0571d3d8a2de4461d74b417;hp=ef9f91f523b6f7c15ebe7871b717c96c9ef61a8c;hb=d95b34a61ec3fc305fe53c0132bfe82e2e5fcc04;hpb=4feafb1e7864b736e1bfe83fe185fbba933b1c60 diff --git a/os/os.h b/os/os.h index ef9f91f5..4b590347 100644 --- a/os/os.h +++ b/os/os.h @@ -8,6 +8,8 @@ #include #include +#include "../arch/arch.h" + enum { os_linux = 1, os_aix, @@ -79,7 +81,7 @@ typedef unsigned long os_cpu_mask_t; #endif #ifndef FIO_HAVE_IOPRIO -#define ioprio_set(which, who, prio) (0) +#define ioprio_set(which, who, prioclass, prio) (0) #endif #ifndef FIO_HAVE_ODIRECT @@ -88,6 +90,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 @@ -125,7 +133,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 @@ -208,12 +220,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; }