#include <stdlib.h>
#include "../arch/arch.h"
+#include "../lib/types.h"
enum {
os_linux = 1,
#endif
#ifndef CONFIG_STRSEP
-#include "../lib/strsep.h"
+#include "../oslib/strsep.h"
+#endif
+
+#ifndef CONFIG_STRLCAT
+#include "../oslib/strlcat.h"
#endif
#ifdef MSG_DONTWAIT
#endif
#ifndef FIO_HAVE_CPU_AFFINITY
-#define fio_getaffinity(pid, mask) do { } while (0)
#define fio_cpu_clear(mask, cpu) do { } while (0)
typedef unsigned long os_cpu_mask_t;
return 0;
}
+static inline int fio_getaffinity(int pid, os_cpu_mask_t *cpumask)
+{
+ return -1;
+}
+
static inline int fio_cpuset_exit(os_cpu_mask_t *mask)
{
return -1;
#endif
#ifndef FIO_PREFERRED_ENGINE
-#define FIO_PREFERRED_ENGINE "sync"
+#define FIO_PREFERRED_ENGINE "psync"
#endif
#ifndef FIO_OS_PATH_SEPARATOR
#endif
#ifndef FIO_HAVE_FS_STAT
-static inline unsigned long long get_fs_size(const char *path)
+static inline unsigned long long get_fs_free_size(const char *path)
{
return 0;
}
#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)
{