[PATCH]: mpstat: code shrink
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Thu Aug 5 22:25:40 UTC 2010
On Fri, Jul 30, 2010 at 10:40:53AM +0200, Marek Polacek wrote:
> On 07/30/2010 04:06 AM, Denys Vlasenko wrote:
>>On Thursday 22 July 2010 12:43, Marek Polacek wrote:
>>> Currently we're determining the number of CPUs by the function
>>>get_cpu_nr() which in turn calls get_sys_cpu_nr() or even
>>>get_proc_cpu(). I think we could easily use sysconf(
>>>_SC_NPROCESSORS_CONF), and if this symbol isn't defined, then we'll read
>>>/proc/cpuinfo. This way we can get rid of those two not very pretty
>>>functions.
>>Well, uh... uclibc unfortunately always returns 1
>>for _SC_NPROCESSORS_CONF...
>>
>Ah, didn't know that. That's mean.
That's not mean, that was NIH ;)
I've pushed an implementation now, fyi.
PS: I somehow doubt that the current mpstat works on sparc?
More information about the busybox
mailing list