cpus_allowed: use __NRPROCESSORS_CONF instead of __SC_NPROCESSORS_ONLN for non-sequen...
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index aba6813f23e943bc0843ce3947b29548c34d897e..a6fde1fd27f6cab60020b4eb71af1ebe4363a7ff 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -352,10 +352,10 @@ static inline unsigned long long get_fs_free_size(const char *path)
 }
 #endif
 
-#ifndef FIO_HAVE_CPU_ONLINE_SYSCONF
-static inline unsigned int cpus_online(void)
+#ifndef FIO_HAVE_CPU_CONF_SYSCONF
+static inline unsigned int cpus_configured(void)
 {
-       return sysconf(_SC_NPROCESSORS_ONLN);
+       return sysconf(_SC_NPROCESSORS_CONF);
 }
 #endif
 
@@ -363,7 +363,7 @@ static inline unsigned int cpus_online(void)
 #ifdef FIO_HAVE_CPU_AFFINITY
 static inline int CPU_COUNT(os_cpu_mask_t *mask)
 {
-       int max_cpus = cpus_online();
+       int max_cpus = cpus_configured();
        int nr_cpus, i;
 
        for (i = 0, nr_cpus = 0; i < max_cpus; i++)