get the node ID
#include <sys/types.h> #include <unistd.h> nid_t getnid( void );
The getnid() function allows the calling process to find out which node it's executing on.
The node ID of the calling process.
/* * print out this node's ID */ #include <stdio.h> #include <sys/types.h> #include <unistd.h> void main() { printf( "I am node %lu\n", getnid() ); }
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |