On Fri, Aug 16, 2002 at 11:36:09AM +0200, Leif Nixon ([EMAIL PROTECTED]) wrote:
> *However*, it turns out glibc already does this!
> 
> sysconf(_SC_NPROCESSORS_CONF) should work on x86, sparc, alpha, mips
> and, probably, ia64.
> 

 Good tip, thanks! Much easier than doing it the hard way.
 glibc even has get_nprocs() to do this.

-- 
 Preston Smith                                <[EMAIL PROTECTED]>
 UNIX Analyst                  Purdue University Physics Computer Network
 GPG Fingerprint:      6D27 5DAA F58D C42B 7A6B  8F48 04E4 2465 F353 03F6

Reply via email to