get_nprocs question

Ulrich Drepper drepper@redhat.com
Wed Mar 17 05:50:00 GMT 2004


Andreas Jaeger wrote:

> OK, then just one more question: What is the difference between these
> two:
> 
> /* Return number of configured processors.  */
> extern int get_nprocs_conf (void) __THROW;
> 
> /* Return number of available processors.  */
> extern int get_nprocs (void) __THROW;

The number of processors the OS knows or knew about need not be the same
 as the number which is currently in use by any process.  This is all
from long before there was affinity.  Processors can be disabled (think
hotplug).  The SPARC kernel always had the distinction, x86 and may
others don't.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libc-hacker mailing list