Make I/O priority option generic for non-Linux environment [1/2]
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index fd47f22a367c5af1e688d59af333dffb796c5e14..98773838cb1a042df847505c7029cce04ae8fba4 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -151,7 +151,7 @@ extern int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu);
 #endif
 
 #ifndef FIO_PREFERRED_ENGINE
-#define FIO_PREFERRED_ENGINE   "sync"
+#define FIO_PREFERRED_ENGINE   "psync"
 #endif
 
 #ifndef FIO_OS_PATH_SEPARATOR
@@ -343,6 +343,14 @@ static inline unsigned long long get_fs_free_size(const char *path)
 }
 #endif
 
+#ifdef __powerpc64__
+#define FIO_HAVE_CPU_ONLINE_SYSCONF
+static inline unsigned int cpus_online(void)
+{
+        return sysconf(_SC_NPROCESSORS_CONF);
+}
+#endif
+
 #ifndef FIO_HAVE_CPU_ONLINE_SYSCONF
 static inline unsigned int cpus_online(void)
 {