NXGetCpuCount

Returns the number of processors (CPUs) that are currently online.

Library:LibC
Classification:NKS
Service:NKS Platform

Syntax

  #include <nks/plat.h>
   
  unsigned int NXGetCpuCount (void);
  

Return Values

Returns the number of processors that are currently online.

NOTE:The returned information is a snapshot and can become stale.

Remarks

The NKS layer uses the following naming scheme for addressing the processors that might be currently online: if N is the number of processors online, these processors can be addressed as a sequence of integers between 0 and N-1. For example, 8 online processors can be addressed with the integers 0 through 7 respectively.

See Also

NXThreadBind