Fix aiocb compile warnings on HPUX
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index 92b6950d305d077261633723b181f35e273b33ae..2eb38e87afda20dae2b52ebd65d1dfc146247e23 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -18,6 +18,8 @@
 #include "os-mac.h"
 #elif defined(_AIX)
 #include "os-aix.h"
+#elif defined(__hpux)
+#include "os-hpux.h"
 #elif defined(__CYGWIN__)
 #include "os-windows.h"
 #else
@@ -30,6 +32,9 @@
 
 #ifdef FIO_HAVE_POSIXAIO
 #include <aio.h>
+#ifndef FIO_OS_HAVE_AIOCB_TYPEDEF
+typedef struct aiocb os_aiocb_t;
+#endif
 #endif
 
 #ifdef FIO_HAVE_SGIO
@@ -102,6 +107,14 @@ typedef unsigned long os_cpu_mask_t;
 #define fio_lookup_raw(dev, majdev, mindev)    1
 #endif
 
+#ifndef FIO_PREFERRED_ENGINE
+#define FIO_PREFERRED_ENGINE   "sync"
+#endif
+
+#ifndef FIO_MAX_JOBS
+#define FIO_MAX_JOBS           2048
+#endif
+
 #ifndef FIO_HAVE_BLKTRACE
 static inline int is_blktrace(const char *fname)
 {
@@ -170,4 +183,18 @@ static inline unsigned long long get_fs_size(const char *path)
 }
 #endif
 
+#ifndef FIO_HAVE_CPU_ONLINE_SYSCONF
+static inline unsigned int cpus_online(void)
+{
+       return sysconf(_SC_NPROCESSORS_ONLN);
+}
+#endif
+
+#ifndef FIO_HAVE_GETTID
+static inline int gettid(void)
+{
+       return getpid();
+}
+#endif
+
 #endif