Initial HP-UX port
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index 1569e409dd964c027b676227d44820e717165d2d..3df7b41be4b6447c73783abf03808b38ca2ee586 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
@@ -106,6 +108,10 @@ typedef unsigned long os_cpu_mask_t;
 #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)
 {
@@ -174,4 +180,11 @@ 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
+
 #endif