lkml.org 
[lkml]   [1999]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: /proc/cpuinfo verbiage differ unnecessarily between ports...

Michael K. Johnson writes:
> Ronald Cole writes:

>> But, there's probably a better, more portable, way to calculate the
>> number of processors for ps.
>
> That would be /proc/stat.

What are you two talking about? This is the portable way:

sysconf(_SC_NPROCESSORS_CONF);

It would seem that libc is broken on SPARC. It would also seem that
the kernel does not provide an efficient way to get this value.
Naturally, one would fix the library and perhaps improve the kernel.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.048 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site