aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-10-27 05:58:19 -0500
committerRob Landley <rob@landley.net>2015-10-27 05:58:19 -0500
commitd4c17cdaf1f72a872dcbe12952412f02810c29b5 (patch)
tree6e2be67906961503052e2c1d7483b95209b6f571 /toys/other
parenteb1bbc245dd6554a8fbe879a4efb903f6e7788cb (diff)
downloadtoybox-d4c17cdaf1f72a872dcbe12952412f02810c29b5.tar.gz
Replace xcount_cpus() with a call to sysconf(_SC_NPROCESSORS_CONF)
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/taskset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/taskset.c b/toys/other/taskset.c
index 29ce3173..abc38723 100644
--- a/toys/other/taskset.c
+++ b/toys/other/taskset.c
@@ -127,7 +127,7 @@ void nproc_main(void)
}
// If getaffinity failed or --all, count cpu entries in proc
- if (!nproc) nproc = xcount_cpus();
+ if (!nproc) nproc = sysconf(_SC_NPROCESSORS_CONF);
xprintf("%u\n", nproc);
}