Initial HP-UX port
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index 4bbdd623a987c174122b2577b2899332605a0a0c..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
@@ -178,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