projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
powerpc: fix cpus_online() to get correct max CPU number for powerpc64
[fio.git]
/
os
/
os.h
diff --git
a/os/os.h
b/os/os.h
index fd47f22a367c5af1e688d59af333dffb796c5e14..02ab40d38a6ca86c3b70552f797a1c6b9b28def7 100644
(file)
--- a/
os/os.h
+++ b/
os/os.h
@@
-343,6
+343,14
@@
static inline unsigned long long get_fs_free_size(const char *path)
}
#endif
}
#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)
{
#ifndef FIO_HAVE_CPU_ONLINE_SYSCONF
static inline unsigned int cpus_online(void)
{