On Sun, Jun 13, 1999 at 02:58:02AM +0100, Alan Cox wrote:
> > C function which returns the number of CPUs in the system? I know I
> > could parse out /proc/cpuinfo or some of the other proc guys, but
> > a nice function would be simpler.
>
> Use glibc 2.1 and you can use sysconf() to read it out (yes sysconf parses
> /proc in Linux no you dont have to care 8))
I must be a bloomin' idiot. What is the parameter to pass to sysconf()
for number of CPUs? I read the sysconf man page and didn't find anything
that looked correct.
As an aside, are the man-pages believable? The sysconf man page is
dated April 18, 1993!! I have man-pages-1.23-3.noarch.rpm on my
[RedHat 6.0] system.
Can you provide me a link to better glibc documentation if the man
pages are not trustworthy?
Brendan
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]