Excessive passing around of struct fio_file
[fio.git] / os.h
diff --git a/os.h b/os.h
index 093a722ebfce1d80f78a76bd99c58fdb01d1d906..da80fbd4f7207e66a0cbb9821bdfabcf389f6ebf 100644 (file)
--- a/os.h
+++ b/os.h
@@ -5,6 +5,8 @@
 #include "os-linux.h"
 #elif defined(__FreeBSD__)
 #include "os-freebsd.h"
+#elif defined(__sun__)
+#include "os-solaris.h"
 #else
 #error "unsupported os"
 #endif
 #define ioprio_set(which, who, prio)   (0)
 #endif
 
-struct thread_data;
-extern int fio_libaio_init(struct thread_data *);
-extern int fio_posixaio_init(struct thread_data *);
-extern int fio_syncio_init(struct thread_data *);
-extern int fio_mmapio_init(struct thread_data *);
-extern int fio_sgio_init(struct thread_data *);
-extern int fio_spliceio_init(struct thread_data *);
+#ifndef FIO_HAVE_ODIRECT
+#define OS_O_DIRECT                    0
+#else
+#define OS_O_DIRECT                    O_DIRECT
+#endif
+
+#ifndef FIO_HAVE_HUGETLB
+#define SHM_HUGETLB                    0
+#define FIO_HUGE_PAGE                  0
+#else
+#define FIO_HUGE_PAGE                  (4096 * 1024)
+#endif
+
+#if __GNUC__ < 3
+#define __must_check
+#else
+#define __must_check                   __attribute__((warn_unused_result))
+#endif
 
 #endif