#include <unistd.h>
#include <stdlib.h>
+#include "../arch/arch.h"
+
enum {
os_linux = 1,
os_aix,
os_hpux,
os_mac,
os_netbsd,
+ os_openbsd,
os_solaris,
os_windows,
os_android,
#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__)
#include <scsi/sg.h>
#endif
-#ifdef CONFIG_STRSEP
+#ifndef CONFIG_STRSEP
#include "../lib/strsep.h"
#endif
#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
#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
#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
})
#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;
}