[PATCH 20/34] pi_stress: use cpus_online() helper
From: Tommi Rantala <hidden>
Date: 2017-05-22 08:26:34
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Tommi Rantala <hidden>
Date: 2017-05-22 08:26:34
Subsystem:
the rest · Maintainer:
Linus Torvalds
Signed-off-by: Tommi Rantala <redacted> --- src/pi_tests/pi_stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
index 36b64ca..116869a 100644
--- a/src/pi_tests/pi_stress.c
+++ b/src/pi_tests/pi_stress.c@@ -270,7 +270,7 @@ int main(int argc, char **argv) setvbuf(stdout, NULL, _IONBF, 0); /* get the number of processors */ - num_processors = sysconf(_SC_NPROCESSORS_ONLN); + num_processors = cpus_online(); /* calculate the number of inversion groups to run */ ngroups = num_processors == 1 ? 1 : num_processors - 1;
--
2.9.3