get_nprocs

Returns the number of processors on the host machine.

Library:LibC
Classification:Linux
Service:System Information

Syntax

  #include <sys/sysinfo.h> 
   
  int get_nprocs( void );
  

Return Values

Returns the number of processors on the host machine. This function cannot fail.

Remarks

This is a GNU extension and has been included in the library to aid the porting of open source code to NetWare.

See Also