bionic had to give up on using /proc/cpuinfo or /proc/stat for counting cpus. in particular, a certain soc vendor rob's worked for in the past insists on doing things wrongly. the only methods we've never had problems with on any kernel on any architecture are:
if you want online cpus, parse /sys/devices/system/cpu/online. if you want offline cpus too, count cpu\d+ entries in /sys/devices/system/cpu. is there a reason why you don't just use sysconf(3) and let it be the C library's problem? (if so, that's probably worth a code comment.) -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer. _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
