Returns the current processor ID (CPU number).
#include <nks/plat.h> NXCpuId_t NXGetCpuID (void);
Returns the current processor ID (CPU number).
NXGetCpuID returns a snapshot of the current processor ID. Unless the calling thread is bound to a processor, the value returned could already be stale.
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.